Skip to main content
Glama

models

List supported model names, aliases, and backend discovery hints for dynamic task configuration.

Instructions

List supported model names, model aliases, and dynamic backend discovery hints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/app/mcp.ts:301-308 (registration)
    Registration of the 'models' tool in the ListToolsRequestSchema handler. Defines the tool name, description ('List supported model names, model aliases, and dynamic backend discovery hints.'), and an empty inputSchema (no arguments).
    {
      name: 'models',
      description: 'List supported model names, model aliases, and dynamic backend discovery hints.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    }
  • The handleModels() method is the actual tool handler. It returns a JSON string of getModelsPayload() as text content.
    private async handleModels(): Promise<ServerResult> {
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(getModelsPayload(), null, 2)
        }]
      };
    }
  • The CallToolRequestSchema switch-case dispatches the 'models' tool name to handleModels().
      case 'models':
        return this.handleModels();
      default:
        throw new McpError(ErrorCode.MethodNotFound, `Tool ${toolName} not found`);
    }
  • The getModelsPayload() function assembles the full response payload: static model lists (CLAUDE_MODELS, CODEX_MODELS, GEMINI_MODELS, FORGE_MODELS, OPENCODE_MODELS), model aliases (MODEL_ALIAS_DETAILS), and dynamic model backend configuration for OpenCode.
    export function getModelsPayload(): {
      aliases: ReadonlyArray<(typeof MODEL_ALIAS_DETAILS)[number]>;
      claude: ReadonlyArray<string>;
      codex: ReadonlyArray<string>;
      gemini: ReadonlyArray<string>;
      forge: ReadonlyArray<string>;
      opencode: ReadonlyArray<string>;
      dynamicModelBackends: {
        opencode: DynamicModelBackendDescription;
      };
    } {
      return {
        aliases: MODEL_ALIAS_DETAILS,
        claude: CLAUDE_MODELS,
        codex: CODEX_MODELS,
        gemini: GEMINI_MODELS,
        forge: FORGE_MODELS,
        opencode: OPENCODE_MODELS,
        dynamicModelBackends: {
          opencode: {
            explicitPrefix: 'oc-',
            explicitPattern: 'oc-<provider/model>',
            discoveryCommand: 'opencode models',
            modelsAreDynamic: true,
          },
        },
      };
    }
  • The getSupportedModelsDescription() helper is used in the 'run' tool description for documentation, listing all supported model names and aliases.
    export function getSupportedModelsDescription(): string {
      return [
        '"claude-ultra", "codex-ultra", "gemini-ultra"',
        ...CLAUDE_MODELS.map((model) => `"${model}"`),
        ...CODEX_MODELS.map((model) => `"${model}"`),
        ...GEMINI_MODELS.map((model) => `"${model}"`),
        ...FORGE_MODELS.map((model) => `"${model}"`),
        ...OPENCODE_MODELS.map((model) => `"${model}"`),
        '"oc-<provider/model>"',
      ].join(', ');
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only mentions 'list', implying a read operation, but discloses no additional behavioral traits like authentication or rate limits.

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 a single, clear sentence with no wasted words. It is appropriately front-loaded.

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

Completeness3/5

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

Given the absence of parameters, output schema, and annotations, the description is minimal. It does not describe the return format or structure, but for a simple listing tool it may be adequate.

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 tool has zero parameters, so according to rules the baseline is 4. The description adds no parameter information as none exist.

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 tool lists supported model names, aliases, and backend discovery hints. It uses specific verbs and resources, and there is no confusion with sibling tools as they are about process management.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool vs alternatives, but sibling tools are unrelated, so confusion is minimal. Usage is implied but not elaborated.

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/lailai258/agent-bridge-mcp'

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