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