( content: CallToolResult['content'][number], )
| 63 | } |
| 64 | |
| 65 | export function getTextContent( |
| 66 | content: CallToolResult['content'][number], |
| 67 | ): string { |
| 68 | if (content.type === 'text') { |
| 69 | return content.text; |
| 70 | } |
| 71 | throw new Error(`Expected text content but got ${content.type}`); |
| 72 | } |
| 73 | |
| 74 | export function getImageContent(content: CallToolResult['content'][number]): { |
| 75 | data: string; |
no outgoing calls