Skip to main content
Glama
0xKoller
by 0xKoller

senadores

Retrieve detailed information about senators in Argentina using this tool, designed to provide access to legislative data from the Argentina Datos API. Ideal for researchers and analysts.

Instructions

Devuelve los senadores.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.ts:372-394 (handler)
    The handler function for the "senadores" tool. It calls getSenadores() to fetch the data, handles empty results and errors, and returns the data as JSON or appropriate text messages.
    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 the list of senators from the Argentina Datos API.
    export const getSenadores = async () => { const senadores = await fetch(`${BASE_URL}/senado/senadores`); const data = await senadores.json(); return data; };
  • main.ts:64-68 (schema)
    Tool schema definition in the McpServer constructor, specifying name, description, and empty parameters for the "senadores" tool.
    { name: "senadores", description: "Devuelve los senadores.", parameters: {}, },
  • main.ts:371-394 (registration)
    Registration of the "senadores" tool using server.tool, including the handler function.
    // 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" }], }; } });

Other Tools

Related Tools

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