Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
serversYes

Implementation Reference

  • 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: [],
        },
    };
  • 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);
  • Inclusion of the tool definition in the allTools array for registration with the server.
    listMcpToolsByServerDefinition,
    listMcpServersDefinition,
  • Import of the handler and definition from the implementation file.
    import { handleListMcpServers, listMcpServersDefinition } from './mcp/list-mcp-servers.js';
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are minimal (only a title), so the description carries the burden of behavioral disclosure. It describes the action (listing servers) and hints at a workflow with another tool, but lacks details on output format, pagination, or error handling. With no annotations to cover these aspects, the description adds some context but remains basic.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences that are front-loaded and efficient. The first sentence states the core purpose, and the second provides essential usage guidance without redundancy. Every sentence adds value, making it appropriately sized and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, output schema exists), the description is largely complete. It covers purpose and usage, and the output schema will handle return values. However, it could benefit from mentioning any limitations (e.g., if the list is static or dynamic), but overall, it's sufficient for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description correctly omits parameter details, focusing on the tool's purpose and usage. This aligns with the baseline for zero parameters, where the description compensates by being clear and concise.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all configured MCP servers on the Letta server'), making the purpose specific and unambiguous. It also distinguishes from the sibling tool 'list_mcp_tools_by_server' by explaining their relationship, which helps differentiate their roles.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage guidance by stating 'Use with list_mcp_tools_by_server to explore available tools from each server.' This indicates when to use this tool (to get server list) and how it complements an alternative (to then explore tools per server), offering clear context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oculairmedia/Letta-MCP-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server