get-recommended-fees
Retrieve optimal Bitcoin transaction fees based on current network conditions to ensure timely confirmations.
Instructions
Get recommended fees for Bitcoin
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get-recommended-fees"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/FeesToolsController.ts:15-32 (registration)Registers the 'get-recommended-fees' tool with the MCP server, including name, description, and an inline async handler that fetches and returns formatted fees as text content.
private registerGetRecommendedFeesHandler(): void { this.server.tool( "get-recommended-fees", "Get recommended fees for Bitcoin", async () => { const recommendedText = await this.feesService.getRecommended(); return { content: [ { type: "text", text: recommendedText, }, ], }; } ); } - TypeScript interface defining the response structure for recommended Bitcoin fees data.
export interface IFeesRecommendedResponse { fastestFee: number; halfHourFee: number; hourFee: number; economyFee: number; minimumFee: number; } - Service method that retrieves raw recommended fees data via request service and formats it into a human-readable string.
async getRecommended(): Promise<string> { const feesRecommendedData = await this.requestService.getFeesRecommended(); return formatResponse<IFeesRecommendedResponse>( "Bitcoin Fees Recommended", feesRecommendedData ); } - Infrastructure method that makes an API request to the 'fees/recommended' endpoint to fetch the fees data.
async getFeesRecommended(): Promise<IFeesRecommendedResponse | null> { return this.client.makeRequest<IFeesRecommendedResponse>( "fees/recommended" ); }