Skip to main content
Glama

search_door_knowledge

Search DOOR support documentation and knowledge base articles by keywords, categories, or content to find relevant technical information and guides.

Instructions

Busca documentos en la DOOR Knowledge Base por palabras clave, categorías o contenido. Retorna una lista de documentos relevantes con resúmenes. Es MUY RÁPIDO porque usa un índice pre-generado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoFiltrar por categoría específica (opcional). Usa list_door_categories para ver las disponibles.
limitNoNúmero máximo de resultados (default: 10)
queryYesTérmino de búsqueda (ej: "installation", "latch m", "intercom", "wiring")

Implementation Reference

  • Registration of the search_door_knowledge tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: 'search_door_knowledge', description: 'Busca documentos en la DOOR Knowledge Base por palabras clave, categorías o contenido. Retorna una lista de documentos relevantes con resúmenes. Es MUY RÁPIDO porque usa un índice pre-generado.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Término de búsqueda (ej: "installation", "latch m", "intercom", "wiring")', }, category: { type: 'string', description: 'Filtrar por categoría específica (opcional). Usa list_door_categories para ver las disponibles.', }, limit: { type: 'number', description: 'Número máximo de resultados (default: 10)', default: 10, }, }, required: ['query'], }, },
  • Input schema definition for the search_door_knowledge tool.
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Término de búsqueda (ej: "installation", "latch m", "intercom", "wiring")', }, category: { type: 'string', description: 'Filtrar por categoría específica (opcional). Usa list_door_categories para ver las disponibles.', }, limit: { type: 'number', description: 'Número máximo de resultados (default: 10)', default: 10, }, }, required: ['query'], },
  • Core implementation of the search_door_knowledge tool. Loads the search index, filters documents by query in keywords and optional category, scores relevance, limits results, formats a markdown response with document info.
    async searchDoorKnowledge(args) { const { query, category, limit = 10 } = args; const index = await this.loadSearchIndex(); const searchTerm = query.toLowerCase(); let results = index.documents.filter(doc => { // Filtrar por categoría si se especifica if (category && doc.category.toLowerCase() !== category.toLowerCase()) { return false; } // Buscar en keywords return doc.keywords.includes(searchTerm); }); // Ordenar por relevancia (número de coincidencias) results = results .map(doc => { const matches = (doc.keywords.match(new RegExp(searchTerm.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'gi')) || []).length; return { ...doc, relevance: matches }; }) .sort((a, b) => b.relevance - a.relevance) .slice(0, limit); if (results.length === 0) { return { content: [ { type: 'text', text: `No se encontraron resultados para: "${query}"\n\nIntenta con otros términos o usa list_door_categories para ver las categorías disponibles.`, }, ], }; } // Formatear resultados de manera concisa let response = `🔍 Encontrados ${results.length} resultados para: "${query}"\n\n`; results.forEach((doc, i) => { response += `${i + 1}. **${doc.title}**\n`; response += ` 📁 ${doc.category}${doc.subcategory ? ` > ${doc.subcategory}` : ''}\n`; response += ` 📄 ID: \`${doc.id}\` | ${doc.pages} páginas\n`; if (doc.summary) { response += ` 📝 ${doc.summary.substring(0, 150)}${doc.summary.length > 150 ? '...' : ''}\n`; } response += `\n`; }); response += `\n💡 Usa get_door_document con el ID para ver el contenido completo.`; return { content: [ { type: 'text', text: response, }, ], }; }
  • Dispatch/registration in the CallToolRequestSchema handler switch statement.
    case 'search_door_knowledge': return await this.searchDoorKnowledge(request.params.arguments);

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/guillelagoria/door-support-mcp'

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