Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_doc_page

Retrieve documentation pages from docs.grove.city to access blockchain API guides, network specifications, and developer resources for cross-chain data queries.

Instructions

Retrieve a documentation page from docs.grove.city

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path to the documentation page (e.g., "/api/overview")

Implementation Reference

  • Handler logic for executing the 'get_doc_page' tool call. Extracts path argument, fetches doc page via docsManager, handles error if not found, and returns JSON stringified content.
    case 'get_doc_page': { const path = args?.path as string; const docPage = await docsManager.getDocPage(path); if (!docPage) { return { content: [ { type: 'text', text: `Documentation page not found: ${path}`, }, ], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify(docPage, null, 2), }, ], }; }
  • Input schema definition for the 'get_doc_page' tool, specifying a required 'path' string parameter.
    inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'The path to the documentation page (e.g., "/api/overview")', }, }, required: ['path'], },
  • Tool registration object for 'get_doc_page', including name, description, and input schema, returned by registerDocsHandlers.
    { name: 'get_doc_page', description: 'Retrieve a documentation page from api.pocket.network/docs', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'The path to the documentation page (e.g., "/api/overview")', }, }, required: ['path'], }, },
  • Core helper method implementing the documentation page fetch: constructs URL, fetches HTML, extracts title using extractTitle, and returns DocPage or null.
    async getDocPage(path: string): Promise<DocPage | null> { try { const url = `${this.baseUrl}${path.startsWith('/') ? path : '/' + path}`; const response = await fetch(url); if (!response.ok) { return null; } const content = await response.text(); return { title: this.extractTitle(content), content, url, lastUpdated: response.headers.get('last-modified') || undefined }; } catch (error) { console.error('Error fetching doc page:', error); return null; } }

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