diputados-actas-por-anio
Retrieve official legislative records for Argentine deputies by specifying a year to access detailed session minutes and proceedings.
Instructions
Devuelve las actas de los diputados de un año específico
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anio | Yes | EJ: 2025 |
Implementation Reference
- main.ts:498-544 (handler)MCP server.tool registration and handler function for the 'diputados-actas-por-anio' tool. It validates the 'anio' parameter, calls the helper getDiputadosActasPorAnio, handles errors, and returns JSON response.server.tool( "diputados-actas-por-anio", "Devuelve las actas de los diputados 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 getDiputadosActasPorAnio(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 de los diputados" }, ], }; } } );
- utils/functions.ts:64-68 (helper)Helper function that performs the actual API fetch for diputados actas by year from argentinadatos.com API.export const getDiputadosActasPorAnio = async (anio: number) => { const actas = await fetch(`${BASE_URL}/diputados/actas/${anio}`); const data = await actas.json(); return data; };
- main.ts:87-93 (schema)Tool schema definition in the server capabilities list, including name, description, and input parameters schema.{ name: "diputados-actas-por-anio", description: "Devuelve las actas de los diputados de un año específico", parameters: { anio: z.number().describe("EJ: 2025"), }, },
- main.ts:4-16 (registration)Import statement registering the helper function getDiputadosActasPorAnio from utils/functions.js into main.ts.import { getFeriados, getEventosPresidenciales, getDolaresHistorico, getDolaresPorCasa, getDolaresPorCasaFecha, getSenadores, getSenadoActas, getSenadoActasPorAnio, getDiputados, getDiputadosActas, getDiputadosActasPorAnio, getSalud,