Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

add_endpoint

Dynamically add new endpoint configurations to extend blockchain data access across 70+ networks including Ethereum, Solana, Cosmos, and Sui.

Instructions

Dynamically add a new endpoint configuration (for extensibility)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesCategory for organization
descriptionYesDescription of what the endpoint does
idYesUnique identifier for the endpoint
methodYesHTTP method
nameYesHuman-readable name
pathYesURL path (e.g., "/api/users/:id")

Implementation Reference

  • Executes the 'add_endpoint' tool by calling endpointManager.addEndpoint with the provided arguments and returns a success or error response.
    case 'add_endpoint': { const endpoint = args as any; try { endpointManager.addEndpoint(endpoint); return { content: [ { type: 'text', text: `Successfully added endpoint: ${endpoint.id}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: error instanceof Error ? error.message : 'Failed to add endpoint', }, ], isError: true, }; } }
  • Registers the 'add_endpoint' tool with the MCP server, including its name, description, and input schema.
    { name: 'add_endpoint', description: 'Dynamically add a new endpoint configuration (for extensibility)', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Unique identifier for the endpoint', }, name: { type: 'string', description: 'Human-readable name', }, path: { type: 'string', description: 'URL path (e.g., "/api/users/:id")', }, method: { type: 'string', enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'], description: 'HTTP method', }, description: { type: 'string', description: 'Description of what the endpoint does', }, category: { type: 'string', description: 'Category for organization', }, }, required: ['id', 'name', 'path', 'method', 'description', 'category'], }, },
  • Implements the core logic for adding a new endpoint to the configuration, including existence check and category management.
    addEndpoint(endpoint: EndpointConfig): void { // Check if endpoint already exists if (this.config.endpoints.find(ep => ep.id === endpoint.id)) { throw new Error(`Endpoint with ID ${endpoint.id} already exists`); } // Add category if it doesn't exist if (!this.config.categories.includes(endpoint.category)) { this.config.categories.push(endpoint.category); } this.config.endpoints.push(endpoint); }

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