Skip to main content
Glama
alexandresanlim

Mempool MCP Server

get-mining-pool

Retrieve detailed information about a specific Bitcoin mining pool by providing its pool ID, enabling analysis of pool performance and network contributions.

Instructions

Returns info for a specific mining pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolIdYesThe poolId to get info for

Implementation Reference

  • The MCP tool handler function for "get-mining-pool". It takes poolId, fetches data from MiningService.getMiningPool, and returns a text content response.
    async ({ poolId }) => { const text = await this.miningService.getMiningPool({ poolId }); return { content: [{ type: "text", text }] }; }
  • Input schema for the "get-mining-pool" tool, defining the required 'poolId' string parameter using Zod.
    { poolId: z.string().describe("The poolId to get info for"), },
  • Registration of the "get-mining-pool" MCP tool, including name, description, input schema, and handler function.
    private registerGetMiningPoolHandler(): void { this.server.tool( "get-mining-pool", "Returns info for a specific mining pool", { poolId: z.string().describe("The poolId to get info for"), }, async ({ poolId }) => { const text = await this.miningService.getMiningPool({ poolId }); return { content: [{ type: "text", text }] }; } );
  • Helper method in MiningService that retrieves mining pool data from the request service and formats it as a string.
    async getMiningPool({ poolId }: { poolId: string }): Promise<string> { const data = await this.requestService.getMiningPool({ poolId }); return formatResponse<IMiningPoolResponse>("Mining Pool", data); }
  • Core helper that performs the actual API request to fetch the specific mining pool data using the API client.
    async getMiningPool({ poolId }: { poolId: string }): Promise<IMiningPoolResponse | null> { return this.client.makeRequest<IMiningPoolResponse>(`mining/pool/${poolId}`); }

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/alexandresanlim/mempool-mcp-server'

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