McpToolResponse class
明示的なコンテンツブロックとオプションの構造化コンテンツを備えたフルMCPツールレスポンス。
コンテンツ配列と structuredContentの両方を完全に制御する必要がある場合は、ツールハンドラーからこのクラスのインスタンスを返します。
return new McpToolResponse({
content: [
new McpTextContent('Here is the image'),
new McpImageContent({ data: base64Data, mimeType: 'image/png' })
],
structuredContent: { imageId: 'logo', format: 'png' }
});
コンストラクター
| Mcp |
プロパティ
| content | |
| is |
|
| structured |
コンストラクターの詳細
McpToolResponse(McpToolResponseInit)
プロパティの詳細
content
isError
isError?: boolean
プロパティ値
boolean
structuredContent
structuredContent?: unknown
プロパティ値
unknown