Skip to main content
Glama

list_embedding_models

Retrieve available embedding models to configure agent embedding preferences within the Letta system.

Instructions

List available embedding models configured on the Letta server. Use with create_agent or modify_agent to set agent embedding preferences.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelsYes

Implementation Reference

  • The core handler function that executes the tool logic: fetches embedding models from the server API endpoint '/models/embedding' and returns them as JSON in a structured MCP response.
    export async function handleListEmbeddingModels(server, _args) {
        try {
            const headers = server.getApiHeaders();
    
            // Use the specific endpoint from the OpenAPI spec
            const response = await server.api.get('/models/embedding', { headers });
            const models = response.data; // Assuming response.data is an array of EmbeddingConfig objects
    
            return {
                content: [
                    {
                        type: 'text',
                        text: JSON.stringify({
                            model_count: models.length,
                            models: models,
                        }),
                    },
                ],
            };
        } catch (error) {
            server.createErrorResponse(error);
        }
    }
  • Tool definition schema including name, description, and empty input schema (no parameters required). Used for tool registration.
    export const listEmbeddingModelsDefinition = {
        name: 'list_embedding_models',
        description:
            'List available embedding models configured on the Letta server. Use with create_agent or modify_agent to set agent embedding preferences.',
        inputSchema: {
            type: 'object',
            properties: {}, // No input arguments needed
            required: [],
        },
    };
  • Output schema defining the expected response structure: object with 'models' array containing name, provider, and dimensions.
    list_embedding_models: {
        type: 'object',
        properties: {
            models: {
                type: 'array',
                items: {
                    type: 'object',
                    properties: {
                        name: { type: 'string' },
                        provider: { type: 'string' },
                        dimensions: { type: 'integer' },
                    },
                    required: ['name'],
                },
            },
        },
        required: ['models'],
    },
  • Import statement bringing in the handler function and tool definition for registration.
        handleListEmbeddingModels,
        listEmbeddingModelsDefinition,
    } from './models/list-embedding-models.js';
  • Dispatch logic in the main tool call handler switch statement that routes 'list_embedding_models' calls to the specific handler.
    case 'list_embedding_models':
        return handleListEmbeddingModels(server, request.params.arguments);
Behavior3/5

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

Annotations include a title but no hints like readOnlyHint or destructiveHint. The description adds value by implying this is a read operation ('List') and specifying the context ('configured on the Letta server'), but doesn't disclose behavioral traits such as rate limits, authentication needs, or output format. With no annotations covering safety or behavior, the description carries some burden but provides only basic operational context.

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, front-loaded with the core purpose followed by usage guidance. Every sentence earns its place by providing essential information without waste. It's appropriately sized for a simple tool with no parameters, making it highly efficient 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, no annotations beyond title, and an output schema exists), the description is fairly complete. It explains what the tool does and how to use it, and since an output schema is present, it doesn't need to detail return values. However, it could be more comprehensive by addressing potential limitations or sibling tool relationships, but for this context, it's sufficient.

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 the schema fully documents the absence of inputs. The description doesn't need to add parameter details, and it appropriately doesn't mention any. This meets the baseline for zero parameters, as the description focuses on purpose and usage without redundancy.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'List available embedding models configured on the Letta server.' It uses a specific verb ('List') and identifies the resource ('embedding models'), but doesn't explicitly differentiate it from sibling tools like 'list_llm_models' or 'list_agents' beyond the resource type. This makes it clear but not fully sibling-distinctive.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool: 'Use with create_agent or modify_agent to set agent embedding preferences.' This gives a practical application scenario. However, it doesn't specify when not to use it or mention alternatives, such as whether other tools might list similar resources or if there are prerequisites for usage.

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