MCPcopy Create free account
hub / github.com/echoVic/blade-code / readResource

Method readResource

src/mcp/client/MCPClient.ts:131–138  ·  view source on GitHub ↗

* 读取资源内容

(sessionId: string, uri: string)

Source from the content-addressed store, hash-verified

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 * 列出工具

Callers 1

readResourceFunction · 0.45

Calls 1

sendRequestMethod · 0.95

Tested by

no test coverage detected