> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# Function: extractToolResult()

> **extractToolResult**(`result`: `object`): `unknown`

从 MCP callTool 的结果中提取实际数据。优先使用 structuredContent（机器可读的 JSON），否则回退为解析文本内容。

## Parameters

| Parameter                   | Type                                                                                 |
| --------------------------- | ------------------------------------------------------------------------------------ |
| `result`                    | \{ `content`: `object`\[]; `isError?`: `boolean`; `structuredContent?`: `unknown`; } |
| `result.content`            | `object`\[]                                                                          |
| `result.isError?`           | `boolean`                                                                            |
| `result.structuredContent?` | `unknown`                                                                            |

## Returns

`unknown`
