senado-actas
Access official Senate session records from Argentina to research legislative proceedings and track parliamentary activities.
Instructions
Devuelve las actas del senado
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "senado-actas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.ts:397-421 (handler)The MCP tool handler for 'senado-actas' that invokes getSenadoActas(), processes the response, handles empty results and errors, and formats as JSON content.
server.tool("senado-actas", "Devuelve las actas del senado", {}, async ({}) => { try { const data = await getSenadoActas(); if (data.length === 0) { return { content: [{ type: "text", text: "No se encontraron actas" }], }; } 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" }, ], }; } }); - main.ts:69-73 (schema)Schema definition for the 'senado-actas' tool in the server constructor, specifying name, description, and empty parameters.
{ name: "senado-actas", description: "Devuelve las actas del senado", parameters: {}, }, - utils/functions.ts:40-44 (helper)Helper function that performs the actual API fetch for senate actas from 'https://api.argentinadatos.com/v1/senado/actas'.
export const getSenadoActas = async () => { const actas = await fetch(`${BASE_URL}/senado/actas`); const data = await actas.json(); return data; }; - main.ts:397-421 (registration)Registration of the 'senado-actas' tool using server.tool, including schema inline and handler.
server.tool("senado-actas", "Devuelve las actas del senado", {}, async ({}) => { try { const data = await getSenadoActas(); if (data.length === 0) { return { content: [{ type: "text", text: "No se encontraron actas" }], }; } 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" }, ], }; } });