Interface: ToolResponse
Defined in: packages/core/src/core/response.ts:91
Standard MCP tool response.
Every handler in mcp-fusion must return this shape. Use the helper functions (success, error, toonSuccess) instead of constructing this manually.
Example
typescript
// ✅ Preferred — use helpers
return success({ id: '123', name: 'Acme' });
// ⚠️ Manual construction (avoid unless custom content types needed)
const response: ToolResponse = {
content: [{ type: 'text', text: 'Hello' }],
};Properties
content
ts
readonly content: readonly {
text: string;
type: "text";
}[];Defined in: packages/core/src/core/response.ts:92
isError?
ts
readonly optional isError: boolean;Defined in: packages/core/src/core/response.ts:93