Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

watson_get_model

Retrieve details of a specific foundation model by providing its model ID and optional region.

Instructions

Get details of a specific foundation model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesModel ID (e.g. ibm/granite-13b-instruct-v2)
regionNo

Implementation Reference

  • The tool handler for 'watson_get_model' — makes a GET request to the Watson ML API endpoint for foundation model specs, filtering by model_id. Uses safeTool for error handling and client.get to perform the authenticated API call.
    server.tool("watson_get_model", "Get details of a specific foundation model", {
      model_id: z.string().describe("Model ID (e.g. ibm/granite-13b-instruct-v2)"), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/ml/v1/foundation_model_specs`, {version:ver,filters:`modelid_${p.model_id}`})));
  • The input schema for 'watson_get_model' defines two parameters: 'model_id' (required string, describes the model ID like ibm/granite-13b-instruct-v2) and 'region' (optional string).
    server.tool("watson_get_model", "Get details of a specific foundation model", {
      model_id: z.string().describe("Model ID (e.g. ibm/granite-13b-instruct-v2)"), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/ml/v1/foundation_model_specs`, {version:ver,filters:`modelid_${p.model_id}`})));
  • Registration function 'registerWatsonTools' which registers all watson* tools including 'watson_get_model' on the MCP server via server.tool(). Called from src/server.ts line 68.
    export function registerWatsonTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) {
      const ml = (r: string) => IBM_ENDPOINTS.WATSON_ML(r);
      const w = () => assertWriteAllowed(config.allowWrite);
      const r = config.region;
      const ver = "2024-05-01";
    
      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})));
    
      server.tool("watson_get_model", "Get details of a specific foundation model", {
        model_id: z.string().describe("Model ID (e.g. ibm/granite-13b-instruct-v2)"), region: z.string().optional(),
      }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/ml/v1/foundation_model_specs`, {version:ver,filters:`modelid_${p.model_id}`})));
    
      server.tool("watson_generate_text", "Generate text using a watsonx.ai foundation model", {
        model_id: z.string().describe("Model ID"), input: z.string().describe("Input prompt"),
        project_id: z.string().describe("watsonx project ID"),
        max_new_tokens: z.number().optional().describe("Max tokens to generate (default 200)"),
        temperature: z.number().optional().describe("Temperature 0-2 (default 0.7)"),
        top_p: z.number().optional(), top_k: z.number().optional(),
        region: z.string().optional(),
      }, async (p) => safeTool(async () => { w();
        return client.post(`${ml(p.region||r)}/ml/v1/text/generation`, {
          model_id:p.model_id, input:p.input, project_id:p.project_id,
          parameters:{max_new_tokens:p.max_new_tokens||200, temperature:p.temperature||0.7, top_p:p.top_p, top_k:p.top_k},
        }, {version:ver});
      }));
    
      server.tool("watson_list_deployments", "List model deployments in a space", {
        space_id: z.string().describe("Deployment space ID"), region: z.string().optional(),
      }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/ml/v4/deployments`, {version:ver,space_id:p.space_id})));
    
      server.tool("watson_deploy_model", "Deploy a model to a space", {
        name: z.string(), space_id: z.string(), asset_id: z.string().describe("Model asset ID"),
        online: z.boolean().optional().describe("Online inference (default true)"), region: z.string().optional(),
      }, async (p) => safeTool(async () => { w();
        return client.post(`${ml(p.region||r)}/ml/v4/deployments`, {
          name:p.name, space_id:p.space_id, asset:{id:p.asset_id},
          online:p.online!==false ? {} : undefined,
        }, {version:ver});
      }));
    
      server.tool("watson_delete_deployment", "Delete a model deployment", {
        deployment_id: z.string(), space_id: z.string(), region: z.string().optional(),
      }, async (p) => safeTool(async () => { w();
        await client.delete(`${ml(p.region||r)}/ml/v4/deployments/${p.deployment_id}`, {version:ver,space_id:p.space_id});
        return {message:"Deployment deleted"};
      }));
    
      server.tool("watson_list_spaces", "List Watson deployment spaces", {
        region: z.string().optional(),
      }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/v2/spaces`, {version:ver})));
    
      server.tool("watson_create_space", "Create a Watson deployment space", {
        name: z.string(), description: z.string().optional(),
        compute_name: z.string().optional().describe("WML instance CRN"), region: z.string().optional(),
      }, async (p) => safeTool(async () => { w();
        const body: Record<string,unknown> = {name:p.name, description:p.description};
        if(p.compute_name) body.compute=[{name:p.compute_name,type:"machine_learning"}];
        return client.post(`${ml(p.region||r)}/v2/spaces`, body, {version:ver});
      }));
    }
  • src/server.ts:13-13 (registration)
    Import of registerWatsonTools from the watson tool module.
    import { registerWatsonTools } from "./tools/watson/index.js";
  • src/server.ts:68-69 (registration)
    Invocation of registerWatsonTools to register all watson tools on the MCP server, including watson_get_model.
    registerWatsonTools(server, client, config);
    console.error(`  ✓ Watson AI (8 tools)`);
Behavior2/5

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

No annotations are provided. The description implies a read operation ('get details') but does not disclose any behavioral traits such as authentication needs, rate limits, or error handling. It adds minimal value beyond the name.

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

Conciseness3/5

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

The description is a single sentence, concise but lacking detail. It is front-loaded with the key action and resource, but does not earn its place due to missing crucial information.

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

Completeness2/5

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

Given no annotations, no output schema, and minimal parameter descriptions, the description is insufficient. It does not specify what details are returned, required permissions, or usage notes, leaving the agent underinformed.

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

Parameters2/5

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

The description does not add meaning beyond the input schema. Schema coverage is 50% (model_id has an example, region has no description). The description fails to explain what 'details' entail or clarify the region parameter.

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 action ('get details') and the resource ('a specific foundation model'). It distinguishes from siblings like watson_list_models (list all models) and watson_deploy_model (deploy).

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It does not mention when to get details vs list models, nor any prerequisites or context for using model_id or region.

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/ahmedselimmansor-ctrl/IBM_cloud_MCP_SERVER'

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