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;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves documentation but doesn't describe what the documentation includes (e.g., format, content), whether it's read-only (implied by 'Get'), any rate limits, authentication needs, or error handling. This is a significant gap for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence ('Get documentation for a specific endpoint') that is front-loaded with the core action and resource. There is no wasted verbiage, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the documentation output includes (e.g., text, JSON structure), how to interpret it, or any behavioral traits. For a tool with no structured support, this leaves critical gaps in understanding its full context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'endpointId' clearly documented as 'The ID of the endpoint'. The description adds no additional meaning beyond this, such as examples of endpoint IDs or where to find them. With high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose ('Get documentation for a specific endpoint') with a clear verb ('Get') and resource ('documentation for a specific endpoint'), but it's vague about what 'documentation' entails (e.g., API specs, usage instructions, parameters) and doesn't distinguish it from sibling tools like 'get_doc_page' or 'search_docs', which also retrieve documentation-related content. It avoids tautology by not merely restating the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an endpoint ID), exclusions (e.g., not for general documentation searches), or comparisons to siblings like 'get_doc_page' or 'search_docs', leaving the agent to infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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