(rpcParams: unknown)
| 255 | } |
| 256 | |
| 257 | function getToolsListCursor(rpcParams: unknown): string | undefined { |
| 258 | if (!rpcParams || typeof rpcParams !== 'object' || !('cursor' in rpcParams)) return undefined |
| 259 | const cursor = (rpcParams as { cursor?: unknown }).cursor |
| 260 | return typeof cursor === 'string' && cursor.length > 0 ? cursor : undefined |
| 261 | } |
| 262 | |
| 263 | async function getDuplicateToolName(serverId: string): Promise<string | null> { |
| 264 | const [duplicate] = await db |