vs_servers_list
Retrieve a paginated list of servers registered in the authenticated organization.
Instructions
List servers (origins) registered in the authenticated organization.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "vs_servers_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| limit | No | Default 50. |
Implementation Reference
- src/tools.ts:379-395 (registration)Tool definition registration: vs_servers_list is defined as a ToolDefinition object in the TOOLS array with name, description, inputSchema, requiresAuth, and handler.
{ name: 'vs_servers_list', description: 'List servers (origins) registered in the authenticated organization.', inputSchema: { type: 'object', properties: { page: { ...INT }, limit: { ...INT, description: 'Default 50.' }, }, additionalProperties: false, }, requiresAuth: true, handler: async (args, client) => client.request('GET', '/api/servers', { query: { page: pickNumber(args, 'page'), limit: pickNumber(args, 'limit') }, }), }, - src/tools.ts:382-389 (schema)Input schema for vs_servers_list: accepts optional 'page' (integer) and 'limit' (integer, default 50) properties.
inputSchema: { type: 'object', properties: { page: { ...INT }, limit: { ...INT, description: 'Default 50.' }, }, additionalProperties: false, }, - src/tools.ts:391-394 (handler)Handler function: calls client.request('GET', '/api/servers') with query params page and limit extracted via pickNumber helper.
handler: async (args, client) => client.request('GET', '/api/servers', { query: { page: pickNumber(args, 'page'), limit: pickNumber(args, 'limit') }, }), - src/tools.ts:37-40 (helper)pickNumber helper: extracts a finite number from args, used to parse page/limit for the handler.
function pickNumber(args: Record<string, unknown>, key: string): number | undefined { const v = args[key]; return typeof v === 'number' && Number.isFinite(v) ? v : undefined; } - src/index.ts:45-46 (registration)MCP SDK registration: the CallToolRequestSchema handler looks up tools by name via findTool (which searches TOOLS array) and invokes the handler.
server.setRequestHandler(CallToolRequestSchema, async (req) => { const tool = findTool(req.params.name);