(client: Client, timeout?: number)
| 119 | export const toolName = (clientName: string, name: string) => sanitize(clientName) + "_" + sanitize(name) |
| 120 | |
| 121 | export function prompts(client: Client, timeout?: number) { |
| 122 | if (!client.getServerCapabilities()?.prompts) return Promise.resolve([]) |
| 123 | return paginate( |
| 124 | (cursor) => client.listPrompts(cursor === undefined ? undefined : { cursor }, { timeout }), |
| 125 | (result) => result.prompts, |
| 126 | ) |
| 127 | } |
| 128 | |
| 129 | export function resources(client: Client, timeout?: number) { |
| 130 | if (!client.getServerCapabilities()?.resources) return Promise.resolve([]) |
no test coverage detected