search_docs
Search Grove documentation to find specific information and answers to technical questions about blockchain data access across multiple networks.
Instructions
Search Grove documentation for a specific query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | No | Optional array of paths to search within | |
| query | Yes | The search query |
Implementation Reference
- src/handlers/docs-handlers.ts:133-147 (handler)The handler function that executes the 'search_docs' tool. Extracts query and paths from arguments, calls docsManager.searchDocs, and returns the results as JSON text content.case 'search_docs': { const query = args?.query as string; const paths = args?.paths as string[] | undefined; const results = await docsManager.searchDocs(query, paths); return { content: [ { type: 'text', text: JSON.stringify(results, null, 2), }, ], }; }
- src/handlers/docs-handlers.ts:43-63 (schema)Tool definition including name, description, and input schema for 'search_docs'.{ name: 'search_docs', description: 'Search Pocket Network documentation for a specific query', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'The search query', }, paths: { type: 'array', items: { type: 'string', }, description: 'Optional array of paths to search within', }, }, required: ['query'], }, },
- src/index.ts:88-101 (registration)Registers all tools including those from registerDocsHandlers (which includes 'search_docs') for the MCP server's tool list.const tools: Tool[] = [ ...registerBlockchainHandlers(server, blockchainService), ...registerDomainHandlers(server, domainResolver), ...registerTransactionHandlers(server, advancedBlockchain), ...registerTokenHandlers(server, advancedBlockchain), ...registerMultichainHandlers(server, advancedBlockchain), ...registerContractHandlers(server, advancedBlockchain), ...registerUtilityHandlers(server, advancedBlockchain), ...registerEndpointHandlers(server, endpointManager), ...registerSolanaHandlers(server, solanaService), ...registerCosmosHandlers(server, cosmosService), ...registerSuiHandlers(server, suiService), ...registerDocsHandlers(server, docsManager), ];
- src/services/docs-manager.ts:43-54 (helper)Core search implementation in DocsManager service: searches specified paths for pages matching the query.async searchDocs(query: string, paths: string[] = ['/']): Promise<DocPage[]> { const results: DocPage[] = []; for (const path of paths) { const page = await this.getDocPage(path); if (page && this.pageMatchesQuery(page, query)) { results.push(page); } } return results; }
- src/services/docs-manager.ts:92-96 (helper)Helper method to check if a document page matches the search query using simple substring match.private pageMatchesQuery(page: DocPage, query: string): boolean { const searchText = `${page.title} ${page.content}`.toLowerCase(); const queryLower = query.toLowerCase(); return searchText.includes(queryLower); }