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
| Name | Required | Description | Default |
|---|---|---|---|
| poolId | Yes | The 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"), },
- src/interface/controllers/MiningToolsController.ts:28-39 (registration)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}`); }