get-price
Retrieve current Bitcoin prices across multiple fiat currencies to monitor market values and support financial analysis.
Instructions
Returns the current BTC price in various fiat currencies
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/GeneralToolsController.ts:28-37 (registration)Registers the 'get-price' MCP tool with the server, including description and an inline asynchronous handler that calls GeneralService.getPrice() to fetch the price and returns it as formatted text content.
private registerGetPriceHandler(): void { this.server.tool( "get-price", "Returns the current BTC price in various fiat currencies", async () => { const text = await this.generalService.getPrice(); return { content: [{ type: "text", text }] }; } ); } - Helper method in GeneralService that fetches raw price data from the request service and formats it into a user-friendly string using the formatResponse utility.
async getPrice(): Promise<string> { const data = await this.requestService.getPrice(); return formatResponse<any>("Current Price", data); } - Core implementation helper that makes the HTTP request to the 'prices' API endpoint via IApiClient to retrieve current BTC price data in various currencies.
async getPrice(): Promise<any | null> { return this.client.makeRequest<any>(`prices`); }