senado-actas-por-anio
Retrieve Argentine Senate session records for a specific year to access legislative proceedings and official documentation.
Instructions
Devuelve las actas del senado de un año específico
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anio | Yes | EJ: 2025 |
Implementation Reference
- main.ts:74-80 (registration)Initial tool registration and schema definition in the McpServer constructor's tools array.{ name: "senado-actas-por-anio", description: "Devuelve las actas del senado de un año específico", parameters: { anio: z.number().describe("EJ: 2025"), }, },
- main.ts:423-470 (handler)MCP tool handler registration: validates 'anio' parameter, fetches data using getSenadoActasPorAnio, handles errors and formats response as JSON.// senado-actas-por-anio server.tool( "senado-actas-por-anio", "Devuelve las actas del senado de un año específico", { anio: z.number().describe("EJ: 2025"), }, async ({ anio }) => { if (anio === undefined) { return { content: [ { type: "text", text: "No se ha provisto el parámetro 'anio'", }, ], }; } try { const data = await getSenadoActasPorAnio(anio); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron actas para el año especificado", }, ], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [ { type: "text", text: "Error al obtener las actas del senado" }, ], }; } } );
- utils/functions.ts:46-50 (helper)Core implementation: fetches senate actas for a specific year from the Argentina Datos API.export const getSenadoActasPorAnio = async (anio: number) => { const actas = await fetch(`${BASE_URL}/senado/actas/${anio}`); const data = await actas.json(); return data; };