list_mcp_servers
Discover configured MCP servers on the Letta server to identify available tools and resources for system management.
Instructions
List all configured MCP servers on the Letta server. Use with list_mcp_tools_by_server to explore available tools from each server.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/mcp/list-mcp-servers.js:4-26 (handler)The main handler function that executes the list_mcp_servers tool logic by fetching MCP servers from the API endpoint '/tools/mcp/servers' and returning them as JSON.export async function handleListMcpServers(server, _args) { try { const headers = server.getApiHeaders(); // Use the specific endpoint from the OpenAPI spec const response = await server.api.get('/tools/mcp/servers', { headers }); const servers = response.data; // Assuming response.data is an object mapping server names to configs return { content: [ { type: 'text', text: JSON.stringify({ server_count: Object.keys(servers).length, servers: servers, }), }, ], }; } catch (error) { server.createErrorResponse(error); } }
- The tool definition including name, description, and input schema (no parameters required).export const listMcpServersDefinition = { name: 'list_mcp_servers', description: 'List all configured MCP servers on the Letta server. Use with list_mcp_tools_by_server to explore available tools from each server.', inputSchema: { type: 'object', properties: {}, // No input arguments needed required: [], }, };
- src/tools/index.js:181-182 (registration)Registration of the tool handler in the central switch statement for tool dispatching within registerToolHandlers.case 'list_mcp_servers': return handleListMcpServers(server, request.params.arguments);
- src/tools/index.js:117-118 (registration)Inclusion of the tool definition in the allTools array for registration with the server.listMcpToolsByServerDefinition, listMcpServersDefinition,
- src/tools/index.js:65-65 (registration)Import of the handler and definition from the implementation file.import { handleListMcpServers, listMcpServersDefinition } from './mcp/list-mcp-servers.js';