Skip to main content
Glama
delano
by delano

get_api

Retrieve details of a specific API using its ID. Optionally include collections, versions, schemas, or git info.

Instructions

Get details of a specific API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiIdYesAPI ID
includeNoAdditional data to include

Implementation Reference

  • Main handler for the 'get_api' tool. Validates apiId, makes a GET request to /apis/{apiId} with optional include parameter, and returns the response data.
    async getApi(params: any): Promise<ToolCallResponse> {
      if (!params.apiId) {
        throw new McpError(ErrorCode.InvalidParams, 'apiId is required');
      }
      const response = await this.client.get(`/apis/${params.apiId}`, {
        params: { include: params.include?.join(',') }
      });
      return this.createResponse(response.data);
    }
  • Type definition for the get_api tool parameters: apiId (required) and optional include array.
    export interface GetApiParams {
      apiId: string;
      include?: Array<'collections' | 'versions' | 'schemas' | 'gitInfo'>;
    }
  • Tool definition registration for 'get_api' with name, description, and input schema.
    {
      name: 'get_api',
      description: 'Get details of a specific API',
      inputSchema: {
        type: 'object',
        properties: {
          apiId: {
            type: 'string',
            description: 'API ID',
          },
          include: {
            type: 'array',
            items: {
              type: 'string',
              enum: ['collections', 'versions', 'schemas', 'gitInfo'],
            },
            description: 'Additional data to include',
          },
        },
        required: ['apiId'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It only states 'Get details' without mentioning read-only nature, authentication needs, or any side effects, leaving the agent uninformed.

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, short sentence, which is concise but lacks structure and detail. It communicates the basic purpose but misses opportunities to add value through additional context or formatting.

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 lack of an output schema, the description should explain what 'details' includes and how to use the include parameter effectively. It fails to provide a complete picture, making it insufficient for an agent to correctly invoke the tool without additional knowledge.

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% coverage, so the descriptions of apiId and include are adequate. The tool description adds no extra explanatory value beyond what the schema already provides, meeting the baseline for high coverage.

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 the tool retrieves details of a specific API, which matches the name. However, it does not explicitly differentiate from sibling tools like get_api_collection or get_api_schema, leaving some ambiguity.

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. The description lacks context about prerequisites or preferred scenarios, forcing the agent to infer usage from the name alone.

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