* 读取资源内容
(sessionId: string, uri: string)
| 129 | * 读取资源内容 |
| 130 | */ |
| 131 | async readResource(sessionId: string, uri: string): Promise<MCPResourceContent> { |
| 132 | const response = await this.sendRequest(sessionId, { |
| 133 | method: 'resources/read', |
| 134 | params: { uri }, |
| 135 | }); |
| 136 | |
| 137 | return response.contents[0]; |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * 列出工具 |
no test coverage detected