(params?: { cursor?: string })
| 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 } }, |