Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

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
NameRequiredDescriptionDefault
pathsNoOptional array of paths to search within
queryYesThe search query

Implementation Reference

  • 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), }, ], }; }
  • 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), ];
  • 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; }
  • 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); }

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/buildwithgrove/mcp-pocket'

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