Skip to main content
Glama

get_api_reference

Retrieve Backstage API references for REST endpoints, GraphQL, and client libraries to support plugin development and framework customization.

Instructions

Get Backstage API reference including REST endpoints, GraphQL, and client libraries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiNoSpecific API to retrieve (optional)

Implementation Reference

  • The handler function that executes the get_api_reference tool. It fetches the API reference content from the knowledge base, optionally filtered by the 'api' parameter, and returns it as JSON-formatted text.
    private getApiReference(api?: string) {
      const content = api ? 
        this.knowledgeBase.api.content[api] : 
        this.knowledgeBase.api.content;
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(content, null, 2),
          },
        ],
      };
    }
  • Input schema for the get_api_reference tool, defining an optional 'api' string parameter with predefined enum values for specific Backstage APIs.
    inputSchema: {
      type: 'object',
      properties: {
        api: {
          type: 'string',
          description: 'Specific API to retrieve (optional)',
          enum: ['catalogApi', 'scaffolderApi', 'techDocsApi', 'authApi', 'searchApi', 'proxyApi', 'graphqlApi']
        }
      }
  • src/index.ts:78-91 (registration)
    Registration of the get_api_reference tool in the listTools response, specifying name, description, and input schema.
    {
      name: 'get_api_reference',
      description: 'Get Backstage API reference including REST endpoints, GraphQL, and client libraries',
      inputSchema: {
        type: 'object',
        properties: {
          api: {
            type: 'string',
            description: 'Specific API to retrieve (optional)',
            enum: ['catalogApi', 'scaffolderApi', 'techDocsApi', 'authApi', 'searchApi', 'proxyApi', 'graphqlApi']
          }
        }
      }
    },
  • src/index.ts:180-181 (registration)
    Dispatch case in the CallToolRequest handler that routes get_api_reference calls to the getApiReference method.
    case 'get_api_reference':
      return this.getApiReference(args?.api as string);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves API references but doesn't describe behavioral traits like whether it's a read-only operation, if it requires authentication, rate limits, or what the output format looks like (e.g., structured data or documentation text). This is a significant gap for a tool with no annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word contributes to understanding the tool's function, making it appropriately sized and well-structured.

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 complexity of retrieving API references and the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., documentation text, structured endpoints), how to handle the optional parameter, or any prerequisites. For a tool with no structured output and behavioral gaps, this is inadequate.

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, with the parameter 'api' fully documented including its optional nature and enum values. The description adds no additional parameter semantics beyond what the schema provides, such as default behavior when no API is specified or details on the retrieved content. Baseline 3 is appropriate as the schema does the heavy lifting.

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's purpose: 'Get Backstage API reference including REST endpoints, GraphQL, and client libraries.' It specifies the verb 'Get' and the resource 'Backstage API reference' with scope details. However, it doesn't explicitly differentiate from sibling tools like 'get_backstage_overview' or 'get_plugin_development_guide,' which might also provide API-related information.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or contexts where this tool is preferred, such as for detailed API specifications versus high-level overviews or examples. This leaves the agent without explicit usage instructions.

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/PawelWaj/MCP'

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