diputados-actas
Access official records of Argentine deputies' legislative sessions to review parliamentary activities and decisions.
Instructions
Devuelve las actas de los diputados
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- utils/functions.ts:58-62 (handler)Core implementation of the tool logic: fetches actas de diputados from the Argentina Datos API.export const getDiputadosActas = async () => { const actas = await fetch(`${BASE_URL}/diputados/actas`); const data = await actas.json(); return data; };
- main.ts:547-577 (handler)MCP server.tool registration and wrapper handler that calls getDiputadosActas() and formats the response.server.tool( "diputados-actas", "Devuelve las actas de los diputados", {}, async ({}) => { try { const data = await getDiputadosActas(); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron actas de los diputados" }, ], }; } 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" }, ], }; } }
- main.ts:94-98 (schema)Tool schema definition in the server constructor's tools array, including name, description, and empty parameters.{ name: "diputados-actas", description: "Devuelve las actas de los diputados", parameters: {}, },
- main.ts:547-577 (registration)Registers the tool handler with MCP server.server.tool( "diputados-actas", "Devuelve las actas de los diputados", {}, async ({}) => { try { const data = await getDiputadosActas(); if (data.length === 0) { return { content: [ { type: "text", text: "No se encontraron actas de los diputados" }, ], }; } 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" }, ], }; } }