Skip to main content
Glama
0xKoller
by 0xKoller

senadores

Retrieve current Argentine senators and their legislative data to analyze government representation or track political activity.

Instructions

Devuelve los senadores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.ts:372-394 (handler)
    Handler implementation for the 'senadores' tool. Calls getSenadores helper, handles empty data and errors, returns JSON response.
    server.tool("senadores", "Devuelve los senadores.", {}, async ({}) => { try { const data = await getSenadores(); if (data.length === 0) { return { content: [{ type: "text", text: "No se encontraron senadores" }], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [{ type: "text", text: "Error al obtener los senadores" }], }; } });
  • main.ts:64-68 (schema)
    Schema definition for the 'senadores' tool in the MCP server constructor's tools list, indicating no input parameters.
    { name: "senadores", description: "Devuelve los senadores.", parameters: {}, },
  • main.ts:371-394 (registration)
    Registration of the 'senadores' tool using server.tool, including inline handler.
    // senadores server.tool("senadores", "Devuelve los senadores.", {}, async ({}) => { try { const data = await getSenadores(); if (data.length === 0) { return { content: [{ type: "text", text: "No se encontraron senadores" }], }; } return { content: [ { type: "text", text: JSON.stringify(data, null, 2), mimeType: "application/json", }, ], }; } catch (error) { return { content: [{ type: "text", text: "Error al obtener los senadores" }], }; } });
  • Helper function that fetches senators data from the Argentina Datos API.
    export const getSenadores = async () => { const senadores = await fetch(`${BASE_URL}/senado/senadores`); const data = await senadores.json(); return data; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xKoller/mcp-argentina-datos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server