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, };

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