watson_list_models
Lists foundation models available on watsonx.ai.
Instructions
List available foundation models on watsonx.ai
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No |
Implementation Reference
- src/tools/watson/index.ts:13-15 (handler)The handler function for the 'watson_list_models' tool. It makes a GET request to the watsonx.ai ML API endpoint for foundation model specs, with an optional region parameter and version/limit query params.
server.tool("watson_list_models", "List available foundation models on watsonx.ai", { region: z.string().optional(), }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/ml/v1/foundation_model_specs`, {version:ver,limit:200}))); - src/tools/watson/index.ts:14-14 (schema)Input schema for 'watson_list_models': an optional 'region' string parameter (Zod schema).
region: z.string().optional(), - src/server.ts:68-69 (registration)Registration call: registerWatsonTools(server, client, config) which registers the 'watson_list_models' tool along with other Watson tools.
registerWatsonTools(server, client, config); console.error(` ✓ Watson AI (8 tools)`); - src/tools/watson/index.ts:7-7 (registration)The registerWatsonTools function definition that registers all Watson tools including 'watson_list_models' via server.tool().
export function registerWatsonTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) { - src/config.ts:75-76 (helper)The IBM_ENDPOINTS.WATSON_ML helper that constructs the watsonx.ai ML API base URL (https://{region}.ml.cloud.ibm.com).
WATSON_ML: (region: string) => `https://${region}.ml.cloud.ibm.com`,