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

Method listResources

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

Source from the content-addressed store, hash-verified

230 }
231
232 async listResources(params?: { cursor?: string }) {
233 if (this._state) this._state.listResourcesCalls++
234 if (this._state?.listResourcesShouldFail) {
235 throw new Error("listResources failed")
236 }
237 const page = this._state?.resourcePages[params === undefined ? "initial" : (params.cursor ?? "")]
238 if (page) return page
239 return { resources: this._state?.resources ?? [] }
240 }
241
242 async listResourceTemplates(params?: { cursor?: string }) {
243 if (this._state) this._state.listResourceTemplatesCalls++

Callers 1

resourcesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected