Skip to main content
Glama

search_backstage_knowledge

Search Backstage documentation and resources to find information on specific topics or keywords for development and customization.

Instructions

Search across all Backstage knowledge for specific topics or keywords

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for finding relevant information

Implementation Reference

  • The main handler function for the 'search_backstage_knowledge' tool. It searches all loaded knowledge bases for matches to the query by stringifying and checking for substring inclusion, collects results with extracted relevant content, and returns a JSON-formatted response.
    private searchBackstageKnowledge(query: string) {
      const results: any[] = [];
      const searchTerm = query.toLowerCase();
    
      // Search through all knowledge bases
      Object.entries(this.knowledgeBase).forEach(([key, knowledge]) => {
        const knowledgeStr = JSON.stringify(knowledge).toLowerCase();
        if (knowledgeStr.includes(searchTerm)) {
          results.push({
            source: key,
            title: (knowledge as any).title,
            relevantContent: this.extractRelevantContent(knowledge, searchTerm)
          });
        }
      });
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              query,
              results,
              totalResults: results.length
            }, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including name, description, and input schema requiring a 'query' string.
    {
      name: 'search_backstage_knowledge',
      description: 'Search across all Backstage knowledge for specific topics or keywords',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query for finding relevant information'
          }
        },
        required: ['query']
      }
    },
  • src/index.ts:189-190 (registration)
    Registration of the tool handler in the switch statement that dispatches tool calls.
    case 'search_backstage_knowledge':
      return this.searchBackstageKnowledge(args?.query as string);
  • Helper function used by the search handler to extract a snippet of relevant content around the matched search term.
    private extractRelevantContent(knowledge: any, searchTerm: string): any {
      // Simple relevance extraction - in a real implementation, this could be more sophisticated
      const content = JSON.stringify(knowledge.content);
      const index = content.toLowerCase().indexOf(searchTerm);
      if (index !== -1) {
        const start = Math.max(0, index - 100);
        const end = Math.min(content.length, index + 100);
        return content.substring(start, end);
      }
      return (knowledge as any).description;
    }
  • Initialization of the knowledgeBase object, which is the data source searched by the tool. Data imported from ./knowledge/ modules.
    this.knowledgeBase = {
      overview: backstageOverview,
      pluginDev: pluginDevelopment,
      api: apiReference,
      community: communityResources,
      examples: examples,
    };
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'search across all Backstage knowledge' but doesn't disclose behavioral traits like whether results are paginated, sorted, or filtered; what format the output takes; or any rate limits or authentication requirements. For a search tool with zero annotation coverage, 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 front-loads the core purpose ('Search across all Backstage knowledge') and adds necessary detail ('for specific topics or keywords'). There is zero waste, and every word earns its place, making it highly concise 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 a search tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., list of results, summaries, links), how results are structured, or any limitations (e.g., search scope, performance). For a tool that likely returns varied data, this lack of context 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 schema description coverage is 100%, with the single parameter 'query' documented as 'Search query for finding relevant information'. The description adds minimal value beyond this, mentioning 'specific topics or keywords' which loosely aligns with the schema but doesn't provide additional syntax, format, or examples. 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 action ('Search') and target resource ('all Backstage knowledge'), specifying scope and method. It distinguishes from siblings like 'get_api_reference' by emphasizing broad search rather than retrieving specific pre-defined resources. However, it doesn't explicitly contrast with all siblings (e.g., 'get_backstage_examples' might also involve searching).

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 when to prefer this over sibling tools like 'get_backstage_overview' for general information or 'get_plugin_development_guide' for specific topics. There are no exclusions or prerequisites stated, leaving the agent to infer usage context.

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