Skip to main content
Glama
delano
by delano

update_api

Updates an existing API by modifying its name, summary, or description using the API ID.

Instructions

Update an existing API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiIdYesAPI ID
nameNoNew API name
summaryNoUpdated brief description
descriptionNoUpdated detailed description

Implementation Reference

  • The handler function that executes the update_api tool logic. It validates apiId is present, extracts it from args, and sends a PUT request to /apis/{apiId} with the remaining data.
    /**
     * Update an existing API
     * @param args Parameters including apiId (required)
     */
    async updateApi(args: any): Promise<ToolCallResponse> {
      if (!args.apiId) {
        throw new McpError(ErrorCode.InvalidParams, 'apiId is required');
      }
      const { apiId, ...data } = args;
      const response = await this.client.put(`/apis/${apiId}`, data);
      return this.createResponse(response.data);
    }
  • TypeScript interface defining the input schema for update_api: optional name, summary, description, and versionTag fields.
    export interface UpdateApiRequest {
      name?: string;
      summary?: string;
      description?: string;
      versionTag?: string;
    }
  • The switch-case registration mapping the string 'update_api' to the updateApi handler method.
    case 'update_api':
      return await this.updateApi(args);
  • Tool definition registration for update_api, declaring its name, description, and JSON input schema with apiId (required), name, summary, and description (optional).
    {
      name: 'update_api',
      description: 'Update an existing API',
      inputSchema: {
        type: 'object',
        properties: {
          apiId: {
            type: 'string',
            description: 'API ID',
          },
          name: {
            type: 'string',
            description: 'New API name',
          },
          summary: {
            type: 'string',
            description: 'Updated brief description',
          },
          description: {
            type: 'string',
            description: 'Updated detailed description',
          },
        },
        required: ['apiId'],
      },
    },
  • Helper createResponse utility used by updateApi to format the API response as JSON text content.
    private createResponse(data: any): ToolCallResponse {
      return {
        content: [{ type: 'text', text: JSON.stringify(data, null, 2) }]
      };
    }
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only states the operation without revealing side effects, idempotency, or what happens to omitted parameters. There is no mention of required permissions or error conditions.

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

Conciseness4/5

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

The description is extremely concise, consisting of a single sentence. It is front-loaded with the action and resource. While efficient, it could be slightly more detailed without becoming verbose.

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 the absence of annotations and output schema, the description is incomplete. It does not explain what happens to the API after update, whether it returns the full updated object, or any constraints. The simple statement is insufficient for a comprehensive understanding.

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

Parameters3/5

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

The input schema has 100% description coverage, so the baseline is 3. The description does not add any additional meaning beyond what the schema already provides for parameters like apiId, name, summary, and description.

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 'Update an existing API', specifying the action (update) and the resource (API). However, it does not differentiate from sibling tools like update_api_version or update_api_comment, which update specific sub-resources.

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 is provided on when to use this tool versus alternatives such as create_api or delete_api. The description lacks context about prerequisites or typical usage scenarios.

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/delano/postman-mcp-server'

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