MCPcopy Index your code
hub / github.com/anomalyco/opencode / listTools

Method listTools

packages/opencode/test/mcp/lifecycle.test.ts:197–205  ·  view source on GitHub ↗
(params?: { cursor?: string })

Source from the content-addressed store, hash-verified

195 }
196
197 async listTools(params?: { cursor?: string }) {
198 if (this._state) this._state.listToolsCalls++
199 if (this._state?.listToolsShouldFail) {
200 throw new Error(this._state.listToolsError)
201 }
202 const page = this._state?.toolPages[params === undefined ? "initial" : (params.cursor ?? "")]
203 if (page) return page
204 return { tools: this._state?.tools ?? [] }
205 }
206
207 async request(
208 request: { method: string; params?: { cursor?: string } },

Callers 1

listToolsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected