Skip to main content
Glama
delano
by delano

get_api_versions

Retrieve all versions of an API by providing its API ID, with optional pagination using cursor and limit.

Instructions

Get all versions of an API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiIdYesAPI ID
cursorNoPagination cursor
limitNoMaximum number of results

Implementation Reference

  • The handler function that executes the 'get_api_versions' tool logic. It validates that apiId is provided, then makes a GET request to /apis/{apiId}/versions with optional pagination params (cursor, limit).
    /**
     * Get all versions of an API
     * @param args Parameters including apiId (required)
     */
    async getApiVersions(args: any): Promise<ToolCallResponse> {
      if (!args.apiId) {
        throw new McpError(ErrorCode.InvalidParams, 'apiId is required');
      }
      const { apiId, ...params } = args;
      const response = await this.client.get(`/apis/${apiId}/versions`, { params });
      return this.createResponse(response.data);
    }
  • The input schema definition for the 'get_api_versions' tool. Specifies required parameter 'apiId' (string) and optional parameters 'cursor' (string) and 'limit' (number).
    {
      name: 'get_api_versions',
      description: 'Get all versions of an API',
      inputSchema: {
        type: 'object',
        properties: {
          apiId: {
            type: 'string',
            description: 'API ID',
          },
          cursor: {
            type: 'string',
            description: 'Pagination cursor',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results',
          },
        },
        required: ['apiId'],
      },
    },
  • The switch-case statement in handleToolCall that routes the tool name 'get_api_versions' to the getApiVersions handler method.
    case 'get_api_versions':
      return await this.getApiVersions(args);
  • Registration of ApiTools tool definitions (including 'get_api_versions') into the global tool definitions list in the PostmanAPIServer.
    this.toolDefinitions = [
      ...this.workspaceTools.getToolDefinitions(),
      ...this.environmentTools.getToolDefinitions(),
      ...this.collectionTools.getToolDefinitions(),
      ...this.userTools.getToolDefinitions(),
      ...this.apiTools.getToolDefinitions(),
Behavior2/5

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

Minimal behavioral disclosure: the description does not mention that this is a read operation, any authentication needs, or that results are paginated. Annotations are absent, so the description carries the full burden.

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 very short, which is concise but at the expense of essential details. It is not overly verbose, but could be improved without increasing length significantly.

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?

The description is incomplete: it does not explain pagination parameters, return value structure, or how it relates to other version retrieval tools. Given the complexity (3 params, no output schema), more context is needed.

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 description adds no additional meaning beyond the schema. Baseline score of 3 is appropriate.

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 'Get all versions of an API' clearly states the verb and resource. However, it does not differentiate from the sibling tool 'get_api_version' which retrieves a single version.

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, nor any mention of pagination context. The description lacks context for effective tool selection.

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