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
| Name | Required | Description | Default |
|---|---|---|---|
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: {}, }, } - src/app/mcp.ts:497-504 (handler)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) }] }; } - src/app/mcp.ts:335-339 (handler)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`); } - src/model-catalog.ts:55-82 (helper)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, }, }, }; } - src/model-catalog.ts:39-49 (helper)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(', '); }