(result: Record<string, unknown> | undefined)
| 136 | } |
| 137 | |
| 138 | function firstText(result: Record<string, unknown> | undefined): string | undefined { |
| 139 | const content = result?.['content']; |
| 140 | if (!Array.isArray(content) || content.length === 0) { |
| 141 | return undefined; |
| 142 | } |
| 143 | const first = asRecord(content[0]); |
| 144 | const text = first?.['text']; |
| 145 | return typeof text === 'string' ? text : undefined; |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Ruft ein Tool ueber POST /rpc und liefert das gepruefte MCP-Result. |
no test coverage detected