Skip to main content
Glama

senado_agenda_comissoes

Get the agenda of Brazilian Senate committee meetings. Filter by date or specific committee to find scheduled hearings and sessions.

Instructions

Obtém agenda de reuniões das comissões do Senado. Pode filtrar por data e comissão específica.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoData específica (YYYYMMDD)
siglaComissaoNoFiltrar por comissão específica

Implementation Reference

  • The tool handler for 'senado_agenda_comissoes' — receives params (data, siglaComissao), parses with AgendaComissoesInput, calls AGENDA endpoint, processes reunioes, optionally filters by comissão, and returns formatted response.
    // senado_agenda_comissoes
    server.tool(
      'senado_agenda_comissoes',
      'Obtém agenda de reuniões das comissões do Senado. Pode filtrar por data e comissão específica.',
      {
        data: z.string().regex(/^\d{8}$/).optional().describe('Data específica (YYYYMMDD)'),
        siglaComissao: z.string().min(2).optional().describe('Filtrar por comissão específica')
      },
      async (params) => {
        try {
          const input = AgendaComissoesInput.parse(params);
          logger.info({ input }, 'Getting agenda comissoes');
    
          // Use provided date or today
          const data = input.data || formatDateYYYYMMDD(new Date());
          const endpoint = ENDPOINTS.AGENDA(data);
    
          const response = await apiRequest<any>(endpoint);
    
          let reunioes: any[] = [];
          if (response.Agenda?.Reunioes?.Reuniao) {
            reunioes = response.Agenda.Reunioes.Reuniao;
          } else if (response.AgendaComissoes?.Reunioes?.Reuniao) {
            reunioes = response.AgendaComissoes.Reunioes.Reuniao;
          } else if (response.Reunioes?.Reuniao) {
            reunioes = response.Reunioes.Reuniao;
          }
    
          if (!Array.isArray(reunioes)) {
            reunioes = reunioes ? [reunioes] : [];
          }
    
          let reunioesFormatadas = reunioes.map(parseReuniaoAgendada);
    
          // Filter by comissao if specified
          if (input.siglaComissao) {
            const siglaUpper = input.siglaComissao.toUpperCase();
            reunioesFormatadas = reunioesFormatadas.filter(r =>
              r.comissao.sigla.toUpperCase() === siglaUpper
            );
          }
    
          const result = createSuccessResponse(
            {
              data,
              siglaComissao: input.siglaComissao || null,
              count: reunioesFormatadas.length,
              reunioes: reunioesFormatadas
            },
            endpoint
          );
    
          return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
          };
        } catch (error) {
          logger.error({ error }, 'Error getting agenda comissoes');
          const errorResult = createErrorResponse(
            'ERRO_AGENDA_COMISSOES',
            error instanceof Error ? error.message : 'Erro ao obter agenda das comissões',
            'Verifique se a data está no formato correto (YYYYMMDD)'
          );
          return {
            content: [{ type: 'text', text: JSON.stringify(errorResult, null, 2) }]
          };
        }
      }
    );
  • Input schema (Zod) for AgendaComissoesInput: validates optional 'data' (YYYYMMDD regex) and optional 'siglaComissao' (min 2 chars, uppercased).
    export const AgendaComissoesInput = z.object({
      data: z.string()
        .regex(/^\d{8}$/, 'Formato deve ser YYYYMMDD')
        .optional()
        .describe('Data específica (YYYYMMDD)'),
    
      siglaComissao: z.string()
        .min(2)
        .toUpperCase()
        .optional()
        .describe('Filtrar por comissão específica')
    });
  • The function registerAgendaTools(server: McpServer) that registers all agenda tools (including senado_agenda_comissoes) on the MCP server.
    export function registerAgendaTools(server: McpServer) {
  • src/server.ts:30-30 (registration)
    Invocation of registerAgendaTools(server) in the Express-based server entry point, which registers the tool on the MCP server.
    registerAgendaTools(server);
  • Helper function parseReuniaoAgendada that maps raw API response data to the ReuniaoAgendadaType (used by the handler to format each reunião).
    function parseReuniaoAgendada(reuniao: any): ReuniaoAgendadaType {
      const comissaoData = reuniao.Comissao || reuniao.IdentificacaoComissao || {};
    
      return {
        codigo: parseInt(reuniao.CodigoReuniao || reuniao.Codigo || '0'),
        comissao: {
          sigla: comissaoData.SiglaComissao || comissaoData.Sigla || '',
          nome: comissaoData.NomeComissao || comissaoData.Nome || ''
        },
        data: reuniao.DataReuniao || reuniao.Data || '',
        hora: reuniao.HoraReuniao || reuniao.Hora || null,
        local: reuniao.LocalReuniao || reuniao.Local || null,
        tipo: reuniao.TipoReuniao?.DescricaoTipoReuniao || reuniao.Tipo || null,
        situacao: reuniao.SituacaoReuniao?.DescricaoSituacaoReuniao || reuniao.Situacao || null
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Only states it can filter by date and committee, without disclosing read-only nature, default behavior, or limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, concise sentence that front-loads purpose. Could be slightly more structured, but highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks output schema and does not describe return format, default behavior when no filters applied, or date format expectations. Incomplete for guiding proper invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage for both parameters. Description merely repeats filtering capability, adding no semantic depth beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'Obtém' and resource 'agenda de reuniões das comissões do Senado'. It distinguishes from sibling tools like senado_listar_comissoes and senado_reunioes_comissao by focusing on schedule of meetings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternatives mentioned. Implied usage is for fetching committee meeting agenda with optional filters, but no comparison with similar tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/SidneyBissoli/senado-br-mcp'

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