McpToolResponse class
Full MCP tool response with explicit content blocks and optional structured content.
Return an instance of this class from a tool handler when you need full control over
both the content array and structuredContent.
return new McpToolResponse({
content: [
new McpTextContent('Here is the image'),
new McpImageContent({ data: base64Data, mimeType: 'image/png' })
],
structuredContent: { imageId: 'logo', format: 'png' }
});
Constructors
| Mcp |
Properties
| content | |
| is |
|
| structured |
Constructor Details
McpToolResponse(McpToolResponseInit)
Property Details
content
isError
isError?: boolean
Property Value
boolean
structuredContent
structuredContent?: unknown
Property Value
unknown