dolares-historico
Access historical exchange rates for multiple Argentine currency exchange houses to track past dollar valuations.
Instructions
Devuelve las cotizaciones de todas las casas de cambio.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.ts:214-248 (handler)The handler function for the 'dolares-historico' tool, registered via server.tool. It invokes getDolaresHistorico, handles empty results and errors, and returns the data as formatted JSON.server.tool( "dolares-historico", "Devuelve las cotizaciones de todas las casas de cambio.", {}, async ({}) => { try { const data = await getDolaresHistorico(); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron cotizaciones de dólares" }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [ { type: "text", text: "Error al obtener las cotizaciones de dólares", }, ], }; } } );
- main.ts:42-46 (schema)Static input schema definition for the 'dolares-historico' tool in the MCP server initialization (no parameters required).{ name: "dolares-historico", description: "Devuelve las cotizaciones de todas las casas de cambio.", parameters: {}, },
- utils/functions.ts:14-18 (helper)Helper function that fetches historical dollar exchange rates from the Argentina Datos API endpoint.export const getDolaresHistorico = async () => { const dolares = await fetch(`${BASE_URL}/cotizaciones/dolares/`); const data = await dolares.json(); return data; };