senado-actas
Retrieve and access official Senate session records from Argentina. Simplify data extraction and analysis of legislative proceedings with structured API responses.
Instructions
Devuelve las actas del senado
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.ts:397-421 (handler)The handler function registered for the "senado-actas" tool. It calls the helper getSenadoActas(), handles empty results and errors, and returns the data as JSON.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:70-73 (schema)Tool schema definition specifying the name, description, and empty input parameters schema.name: "senado-actas", description: "Devuelve las actas del senado", parameters: {}, },
- utils/functions.ts:40-44 (helper)Supporting utility function that performs the actual API fetch for senate actas data.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 inline 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" }, ], }; } });