Skip to main content
Glama

get_backstage_examples

Retrieve code examples and samples for Backstage development scenarios including plugins, catalog, templates, and configuration to accelerate framework customization.

Instructions

Get code examples and samples for common Backstage development scenarios

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoType of example to retrieve (optional)
specificNoSpecific example within the type (optional)

Implementation Reference

  • The main handler function that implements the core logic of the 'get_backstage_examples' tool. It extracts example content from the knowledge base, filters by optional 'type' and 'specific' parameters, and returns it as formatted JSON text.
    private getBackstageExamples(type?: string, specific?: string) {
      let content = this.knowledgeBase.examples.content;
      
      if (type) {
        content = content[type];
        if (specific && content[specific]) {
          content = content[specific];
        }
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(content, null, 2),
          },
        ],
      };
    }
  • Input schema for the 'get_backstage_examples' tool, defining optional 'type' (enum) and 'specific' (string) parameters for filtering examples.
    inputSchema: {
      type: 'object',
      properties: {
        type: {
          type: 'string',
          description: 'Type of example to retrieve (optional)',
          enum: ['pluginExamples', 'catalogExamples', 'templateExamples', 'configExamples']
        },
        specific: {
          type: 'string',
          description: 'Specific example within the type (optional)'
        }
      }
  • src/index.ts:106-123 (registration)
    Registration of the 'get_backstage_examples' tool in the ListTools response, including name, description, and input schema.
    {
      name: 'get_backstage_examples',
      description: 'Get code examples and samples for common Backstage development scenarios',
      inputSchema: {
        type: 'object',
        properties: {
          type: {
            type: 'string',
            description: 'Type of example to retrieve (optional)',
            enum: ['pluginExamples', 'catalogExamples', 'templateExamples', 'configExamples']
          },
          specific: {
            type: 'string',
            description: 'Specific example within the type (optional)'
          }
        }
      }
    },
  • src/index.ts:186-187 (registration)
    Registration of the tool handler in the CallToolRequest switch statement, dispatching calls to the getBackstageExamples method.
    case 'get_backstage_examples':
      return this.getBackstageExamples(args?.type as string, args?.specific 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 what the tool does but lacks details on permissions, rate limits, response format, or any side effects. For a tool with no annotations, this is a significant gap in transparency.

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 directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 and no output schema, the description is incomplete. It doesn't explain what the return values look like (e.g., format of examples), behavioral traits, or usage context. For a tool with 2 parameters and no structured support, more detail is needed to be fully helpful.

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?

Schema description coverage is 100%, so the schema already documents both parameters with descriptions and an enum. The description adds no additional meaning beyond implying retrieval of examples, which is covered by the schema. 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 verb ('Get') and resource ('code examples and samples for common Backstage development scenarios'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_plugin_development_guide' or 'search_backstage_knowledge', which might also provide code-related content, so it misses full sibling distinction.

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 any prerequisites, exclusions, or comparisons to sibling tools such as 'get_api_reference' or 'search_backstage_knowledge', leaving the agent without context for 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/PawelWaj/MCP'

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