( result: CompatibilityCallToolResult )
| 196 | * ``` |
| 197 | */ |
| 198 | export function extractText( |
| 199 | result: CompatibilityCallToolResult |
| 200 | ): string | undefined { |
| 201 | const r = result as MCPResultWithContent; |
| 202 | if (!r.content) return undefined; |
| 203 | const textContent = r.content.find((c) => c.type === "text"); |
| 204 | return textContent?.text; |
| 205 | } |
| 206 | |
| 207 | /** |
| 208 | * Extracts image data from an MCP screenshot result. |
no outgoing calls
no test coverage detected