Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_endpoint_docs

Retrieve documentation for specific blockchain endpoints to understand their functionality and usage within Grove's MCP Server for Pocket Network.

Instructions

Get documentation for a specific endpoint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointIdYesThe ID of the endpoint

Implementation Reference

  • The handler logic for the 'get_endpoint_docs' tool. Extracts the endpointId from arguments, fetches the docs using DocsManager, and returns the JSON stringified response or an error.
    case 'get_endpoint_docs': { const endpointId = args?.endpointId as string; const docPage = await docsManager.getEndpointDocs(endpointId); if (!docPage) { return { content: [ { type: 'text', text: `Documentation not found for endpoint: ${endpointId}`, }, ], isError: true, }; } return { content: [ { type: 'text', text: JSON.stringify(docPage, null, 2), }, ], }; }
  • Tool registration definition including name, description, and input schema for 'get_endpoint_docs'.
    { name: 'get_endpoint_docs', description: 'Get documentation for a specific endpoint', inputSchema: { type: 'object', properties: { endpointId: { type: 'string', description: 'The ID of the endpoint', }, }, required: ['endpointId'], }, },
  • Input schema defining the required 'endpointId' parameter for the tool.
    inputSchema: { type: 'object', properties: { endpointId: { type: 'string', description: 'The ID of the endpoint', }, }, required: ['endpointId'], },
  • Helper method in DocsManager that maps endpointId to the documentation path and delegates to getDocPage.
    async getEndpointDocs(endpointId: string): Promise<DocPage | null> { // Convention: endpoint docs are at /endpoints/{endpointId} return this.getDocPage(`/endpoints/${endpointId}`); }
  • Core helper method that fetches the documentation content from the base URL and extracts title.
    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