Skip to main content
Glama
gcontiero11

mcp-camara-pecs

by gcontiero11

mcp-camara-pecs

Servidor MCP (Model Context Protocol) para consultar votações e tramitações de PECs (Propostas de Emenda à Constituição) usando a API de Dados Abertos da Câmara dos Deputados (https://dadosabertos.camara.leg.br/api/v2).

A API é pública e não exige chave de autenticação. Este servidor apenas consome dados abertos já disponíveis a qualquer cidadão.

Parte do repositório mcp-api-publica-governo-brasil. A v1 cobre a Câmara dos Deputados; a integração com o Senado Federal está planejada (ver .claude/tasks/feature/).

Ferramentas expostas

Ferramenta

O que faz

Endpoint

listar_pecs

Lista PECs (filtros: ano, número, palavras-chave, datas)

GET /proposicoes?siglaTipo=PEC

detalhar_pec

Dados completos de uma PEC por id

GET /proposicoes/{id}

listar_autores_pec

Autores/apresentantes da PEC

GET /proposicoes/{id}/autores

listar_tramitacoes_pec

Histórico de tramitação

GET /proposicoes/{id}/tramitacoes

listar_votacoes_pec

Votações associadas à PEC

GET /proposicoes/{id}/votacoes

detalhar_votacao

Resultado/detalhe de uma votação

GET /votacoes/{id}

listar_votos_votacao

Voto nominal de cada deputado

GET /votacoes/{id}/votos

listar_orientacoes_votacao

Orientação de cada bancada

GET /votacoes/{id}/orientacoes

Related MCP server: MCP Câmara BR

Instalação

python -m venv .venv
source .venv/bin/activate
pip install -e .          # produção
pip install -e ".[dev]"   # com dependências de teste

Dependências opcionais (extras)

O pacote base instala só o servidor MCP. Os "extras" adicionam o que cada uso precisa:

Extra

Comando

O que traz / quando usar

(nenhum)

pip install -e .

Só o servidor MCP (mcp-camara-pecs).

dev

pip install -e ".[dev]"

Ferramentas de teste (pytest…).

host

pip install -e ".[host]"

O host pecs-host com backend LM Studio (traz openai + rich).

ollama

pip install -e ".[host,ollama]"

Adiciona o backend Ollama (traz ollama). Combine com host.

Trocou de backend depois de instalar? Reinstale o extra correspondente — senão falta a lib do backend novo (ex.: ModuleNotFoundError: No module named 'openai').

Uso

O servidor roda no transporte stdio:

python -m mcp_camara_pecs
# ou, via console-script:
mcp-camara-pecs

Configuração no Claude Desktop / Cursor

Adicione ao arquivo de configuração de MCP servers (use o caminho absoluto do Python do seu venv):

{
  "mcpServers": {
    "camara-pecs": {
      "command": "/caminho/para/.venv/bin/python",
      "args": ["-m", "mcp_camara_pecs"]
    }
  }
}

Variáveis de ambiente (opcionais)

  • CAMARA_API_BASE — sobrescreve a URL base da API.

  • HTTP_TIMEOUT — timeout das requisições em segundos (padrão: 30).

Desenvolvimento

pip install -e ".[dev]"
pytest                    # testes unitários (HTTP mockado, sem rede)
npx @modelcontextprotocol/inspector python -m mcp_camara_pecs   # inspeção manual

Exemplo de fluxo

  1. listar_pecs(ano=2019, keywords="reforma") → obtenha o id da PEC.

  2. detalhar_pec(id) e listar_tramitacoes_pec(id).

  3. listar_votacoes_pec(id) → obtenha o id da votação.

  4. detalhar_votacao(id), listar_votos_votacao(id), listar_orientacoes_votacao(id).

Host CLI (busca com LLM)

Além do servidor, o projeto traz um host MCP em terminal (pecs-host): você pergunta em português, um LLM interpreta, chama as ferramentas do servidor pelo protocolo MCP e responde. Dois backends são suportados:

  • LM Studio (padrão) — qualquer modelo servido pelo endpoint compatível com OpenAI.

  • Ollama — LLM local nativo, 100% offline (PECS_HOST_BACKEND=ollama).

Modelos com bom suporte a tool-calling (Qwen2.5, Llama 3.1 etc.) encadeiam as ferramentas de forma mais confiável; modelos muito pequenos podem errar o schema.

Dois jeitos de usar o MCP com o LM Studio — não confunda:

  1. App do LM Studio como host — você configura este servidor MCP no mcp.json do próprio app e conversa pela interface dele; o LM Studio chama as ferramentas sozinho. Não usa o pecs-host.

  2. pecs-host no terminal (este tutorial) — o CLI é o host e fala com o modelo pelo servidor HTTP do LM Studio. Exige o servidor local ligado (passo 3).

Tutorial passo a passo — LM Studio (Linux · macOS · Windows)

Do zero até a primeira pergunta respondida. Onde o comando muda por sistema, os três estão indicados.

1. Instalar o LM Studio

Baixe o instalador em https://lmstudio.ai e instale:

  • Linux — arquivo .AppImage: dê permissão de execução e rode (chmod +x LM-Studio-*.AppImage && ./LM-Studio-*.AppImage).

  • macOS — arquivo .dmg: arraste o app para Applications.

  • Windows — instalador .exe: siga o assistente.

2. Baixar um modelo com suporte a ferramentas

No LM Studio, abra a aba 🔍 Discover/Search, procure um modelo bom em tool-calling e baixe. Sugestões: Qwen2.5 7B Instruct (equilíbrio) ou Qwen2.5 3B Instruct (mais leve). Evite modelos muito pequenos — eles erram o formato das chamadas de ferramenta.

3. Ligar o servidor local

⚠️ Carregar o modelo e conseguir conversar no app NÃO significa que o servidor HTTP está no ar. O chat do app funciona sem ele; o pecs-host precisa dele ligado.

Abra a aba Developer (ícone >_), carregue o modelo no topo e clique em Start Server (ou pelo terminal: lms server start). O endpoint padrão é http://localhost:1234/v1.

Verifique que subiu de verdade:

lms server status            # deve dizer "running on port 1234"
curl http://localhost:1234/v1/models   # deve listar seus modelos

Use o endpoint /v1 (compatível com OpenAI) — é o único que aceita ferramentas. Os endpoints da API nativa do LM Studio (/api/v0/..., /api/v1/chat) usam outro formato e rejeitam tools, então não funcionam com o pecs-host.

4. Descobrir o nome exato do modelo

PECS_HOST_MODEL precisa bater com o identificador que o LM Studio expõe (essa é a causa nº 1 do erro "model not found"). Para descobrir:

# Linux / macOS
curl http://localhost:1234/v1/models
# Windows (PowerShell)
Invoke-RestMethod http://localhost:1234/v1/models | ConvertTo-Json -Depth 5

Anote o valor exato do campo "id" — ele pode incluir um prefixo de publisher (ex.: google/gemma-4-e4b, qwen2.5-7b-instruct). É esse valor, com prefixo e tudo, que vai em PECS_HOST_MODEL.

5. Preparar o ambiente Python (>= 3.10)

Recomendado: pyenv 3.11.13 (evita depender do Python do sistema).

# Linux / macOS (com pyenv)
pyenv install 3.11.13
pyenv shell 3.11.13
python -m venv .venv
source .venv/bin/activate
# Windows (PowerShell) — pyenv-win, ou o Python 3.11 do python.org
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1

6. Instalar o projeto

pip install -e ".[host]"

7. Rodar o host

Com o servidor do LM Studio no ar, defina o nome do modelo (passo 4) e rode pecs-host. A sintaxe da variável de ambiente muda por shell:

# Linux / macOS (bash/zsh)
PECS_HOST_MODEL="qwen2.5-7b-instruct" pecs-host
# Windows (PowerShell)
$env:PECS_HOST_MODEL = "qwen2.5-7b-instruct"; pecs-host
:: Windows (cmd.exe)
set PECS_HOST_MODEL=qwen2.5-7b-instruct && pecs-host

Se o LM Studio estiver em outra máquina, acrescente PECS_HOST_BASE_URL (ex.: http://192.168.0.10:1234/v1) da mesma forma.

8. Primeira pergunta

No REPL, pergunte à vontade (ex.: "Liste 3 PECs de 2023", "Quais as votações da PEC 2595897 e como cada bancada orientou?"). Comandos: /tools, /modelo <nome>, /sair.

Problemas comuns

Sintoma

Causa provável / solução

curl .../v1/models recusa conexão na porta 1234

Servidor HTTP desligado. Conversar no app não liga o servidor — rode lms server start (ou Start Server na aba Developer).

Não consegui falar com o LM Studio

Servidor não está ligado (passo 3) ou PECS_HOST_BASE_URL errado. Teste o curl do passo 4.

model not found

PECS_HOST_MODEL não bate com o id exato do passo 4 (inclusive o prefixo de publisher), ou nenhum modelo carregado.

Unrecognized key(s): 'tools'

Você apontou para um endpoint /api/... (API nativa). Use PECS_HOST_BASE_URL terminando em /v1.

Respostas sem usar ferramentas / loop não conclui

Modelo fraco em tool-calling: troque por Qwen2.5/Llama 3.1 com /modelo <nome>.

Alternativa — Ollama (100% offline)

curl -fsSL https://ollama.com/install.sh | sh   # instalar (Linux, pode pedir sudo)
ollama pull qwen2.5:7b                           # modelo com suporte a ferramentas
ollama serve &                                   # garantir o serviço no ar
pip install -e ".[host,ollama]"                  # projeto + backend ollama
PECS_HOST_BACKEND=ollama pecs-host               # rodar usando o Ollama

Variáveis de ambiente (host)

  • PECS_HOST_BACKENDlmstudio (padrão) ou ollama.

  • PECS_HOST_MODEL — nome do modelo (LM Studio: precisa bater com o carregado; Ollama: padrão qwen2.5:7b).

  • PECS_HOST_BASE_URL — endpoint OpenAI-compat do LM Studio (padrão http://localhost:1234/v1).

  • PECS_HOST_API_KEY — chave enviada ao endpoint (padrão lm-studio; o LM Studio ignora).

  • OLLAMA_HOST — endereço do Ollama (padrão http://localhost:11434).

Licença

MIT.

Available Tools

8 tools
detalhar_pecA

Retorna os dados completos de uma PEC pelo seu id.

Inclui ementa detalhada, palavras-chave e o status/tramitação mais recente.
Obtenha o `id` com `listar_pecs`.
ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses that the tool returns the 'most recent' status/tramitação rather than the full history, and that it includes ementa and keywords. However, it doesn't cover error behavior (e.g., invalid/deleted ID) or other potential side effects, which is a gap for a read tool with no annotation support.

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

Conciseness5/5

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

The description is compact: two short sentences plus a one-line instruction. The main purpose is front-loaded, and every sentence adds value (returns data, what data, how to get the id).

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

Completeness4/5

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

The tool has a single parameter, and an output schema exists (given context), so the description needn't detail return values. It covers the key context: what the tool returns and how to obtain the required id. The only minor omission is not explicitly stating when to use this versus sibling tools for detailed variant views, though the content list hints at it.

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

Parameters4/5

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

The schema only defines 'id' as an integer with 0% description coverage. The description compensates by clarifying that the id belongs to a PEC and that it should be obtained from listar_pecs, adding practical meaning beyond the bare 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?

States a specific verb and resource: 'Retorna os dados completos de uma PEC pelo seu id' – returns complete data of a PEC by ID. The list of included content (ementa, keywords, latest status) differentiates it from sibling tools that focus on specific aspects like tramitações or votacoes.

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

Usage Guidelines4/5

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

Gives an explicit prerequisite: 'Obtenha o id com listar_pecs', which tells the agent to first list PECs to obtain the id. It doesn't explicitly exclude alternatives, but provides clear context for when this endpoint should be used (after listing, to fetch the full record).

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

detalhar_votacaoA

Retorna o detalhe/resultado de uma votação pelo seu id.

Inclui descrição, órgão, se foi aprovada (`aprovacao`) e o placar. Obtenha o
`id` com `listar_votacoes_pec`.
ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It clearly signals this is a read operation that returns the result/detail of a vote and enumerates the included fields, which is useful behavioral context. It does not mention errors or permissions, but for a simple read tool with an output schema, this is adequate.

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

Conciseness5/5

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

Three short sentences each add value: what the tool returns, what the response includes, and where to get the required id. It is front-loaded and contains no filler.

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

Completeness5/5

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

For a single-parameter read tool with an output schema, the description covers the required input, its source, and the key result contents. The agent has everything needed to invoke it correctly.

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

Parameters4/5

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

The schema only defines `id` as a string with no description, so schema coverage is 0%. The description compensates by explaining what the id refers to and explicitly telling the agent how to obtain it via `listar_votacoes_pec`.

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?

The description uses a specific verb ('Retorna') and resource ('detalhe/resultado de uma votação pelo seu id'), and it lists the meaningful output fields (descrição, órgão, aprovacao, placar). This clearly distinguishes it from sibling tools like detalhar_pec or listar_votos_votacao.

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

Usage Guidelines4/5

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

The description gives an explicit usage instruction: obtain the `id` with `listar_votacoes_pec`. This establishes the prerequisite flow clearly. It does not explicitly list alternatives or exclusions, but the id-source instruction provides enough contextual guidance.

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

listar_autores_pecC

Lista os autores/apresentantes de uma PEC (deputados, senadores, órgãos).

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It only states the action ('lists') without revealing whether it is read-only, what the output format is, pagination, error conditions, or any side effects. The one-line text is insufficient for a tool with zero annotation coverage.

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

Conciseness5/5

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

The description is a single, concise sentence that front-loads the primary action. There is no unnecessary detail or repetition, making it efficient for an agent to process.

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?

Despite having an output schema and only one parameter, the description is incomplete. It fails to clarify the meaning of the 'id' parameter, which is essential for correct invocation. Additionally, it does not mention any preconditions or typical use cases, leaving the agent under-informed for a tool that is otherwise trivial.

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

Parameters1/5

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

Schema description coverage is 0%, so the description must explain the 'id' parameter. It does not mention that 'id' refers to the PEC identifier, leaving the agent to infer from the tool name. This is a critical gap; the description adds no value beyond the generic schema property.

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?

The description clearly states the tool's function: listing the authors/presenters of a specific PEC, with examples of author types (deputados, senadores, órgãos). This is a specific verb+resource combination that distinguishes it from siblings like listar_pecs (list PECs) and detalhar_pec (detail a PEC).

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention conditions, exclusions, or that it should be used when needing authors for a given PEC id. The context is implied but not explicit.

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

listar_orientacoes_votacaoA

Lista a orientação de cada bancada/partido em uma votação.

Mostra como cada liderança orientou seus deputados a votar. Repassado sem filtro por ser uma lista curta.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It communicates that this is a read operation and that no filtering is applied because the list is short, which is useful. It does not address data scope, ordering, or side effects, but for a simple read these are minor gaps.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core purpose and followed by a useful non-filtering note. No filler or repetition of schema details.

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

Completeness3/5

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

For a one-parameter read-only listing backed by an output schema, the description is nearly adequate. However, it lacks explicit parameter semantics and usage-vs-alternative guidance, which are needed for fully confident 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 coverage is 0% and the only parameter, id, is undocumented beyond its title. The description implies that id refers to a specific votação ('em uma votação'), providing partial semantics, but it never explicitly states what identifier is expected or where it comes from.

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?

States a specific verb ('Lista') and a specific resource: the orientation of each bench/party in a vote. The second sentence clarifies that it covers how leadership guided deputies to vote, distinguishing it from sibling tools like listar_votos_votacao, which deal with individual votes.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool instead of sibling tools such as listar_votos_votacao or detalhar_votacao. The 'sem filtro' note explains an implementation detail, not selection criteria or prerequisites.

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

listar_pecsA

Lista Propostas de Emenda à Constituição (PECs).

Use para descobrir PECs e obter o `id` de cada uma (necessário nas demais
ferramentas). Filtros são opcionais e combináveis.

Parâmetros:
- ano: ano de apresentação (ex.: 2023).
- numero: número da proposição.
- keywords: termos de busca na ementa/palavras-chave (ex.: "reforma tributária").
- data_apresentacao_inicio / data_apresentacao_fim: intervalo AAAA-MM-DD.
- ordenar_por: campo de ordenação ("id", "ano", "numero").
- ordem: "ASC" ou "DESC".
- max_itens: teto de resultados retornados (paginação automática).
ParametersJSON Schema
NameRequiredDescriptionDefault
anoNo
ordemNoDESC
numeroNo
keywordsNo
max_itensNo
ordenar_porNoid
data_apresentacao_fimNo
data_apresentacao_inicioNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It conveys a read-only listing operation through 'Lista' and 'descobrir', discloses that filters are optional and combinable, and mentions automatic pagination with max_itens as a cap. It does not detail API limits, auth, or response format, but the output schema covers the latter.

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

Conciseness5/5

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

The description is front-loaded with purpose, followed by usage, then a compact parameter list. Every sentence adds value and no information is repeated from the schema.

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

Completeness5/5

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

For a list tool with 8 optional parameters and an output schema, the description covers purpose, usage, all parameter semantics, and key behavioral details. Nothing an agent needs to invoke it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, and the description fully compensates by documenting all 8 parameters with concrete examples (ano: 2023, keywords: 'reforma tributária'), value domains for ordenar_por and ordem, date format AAAA-MM-DD, and the meaning of max_itens as a result cap with automatic pagination.

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?

The first sentence 'Lista Propostas de Emenda à Constituição (PECs)' states a specific verb and resource, and the second clarifies its role as the discovery/ID-gathering entry point ('Use para descobrir PECs e obter o id de cada uma (necessário nas demais ferramentas)'). This clearly separates it from the detail and sub-resource sibling tools.

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

Usage Guidelines4/5

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

The description explicitly tells the agent to use this tool when it needs to discover PECs and obtain their ids for downstream tools, and notes filters are optional and combinable. It does not explicitly name alternatives or provide when-not-to-use exclusions, so it falls short of a 5.

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

listar_tramitacoes_pecA

Lista o histórico de tramitação de uma PEC, em ordem cronológica.

Cada item traz data/hora, órgão, o tipo de tramitação, a situação e o
despacho. Filtre por intervalo com `data_inicio`/`data_fim` (AAAA-MM-DD).
ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
data_fimNo
max_itensNo
data_inicioNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It discloses the return fields and chronological ordering, but omits the direction of the ordering info and the effect of max_itens. It also does not discuss pagination or limits, which matters for a listing tool.

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

Conciseness5/5

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

Two short, direct sentences with no redundancy. The core purpose, output contents, and filtering option are all presented up front with minimal verbosity.

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

Completeness4/5

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

An output schema exists, so return-value structure is already covered. The description provides the essential purpose and date-filter semantics; the main gap is max_itens behavior, but the general context is sufficient for a straightforward call.

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 description coverage is 0%, so the description must compensate. It explains data_inicio/data_fim and their AAAA-MM-DD format, but does not document id or max_itens. The id is inferable from context, but max_itens is left only with its schema title.

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?

The description opens with a specific verb ('Lista') and a clear resource ('histórico de tramitação de uma PEC'), then details the output fields and chronological order. This distinguishes it from siblings such as listar_votacoes_pec and detalhar_pec, even without naming them.

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

Usage Guidelines4/5

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

It clearly indicates the tool is for consulting the procedural history of a PEC, not for votes or general details. However, it does not explicitly mention when not to use it or compare it with alternatives, so it stops short of a 5.

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

listar_votacoes_pecA

Lista as votações associadas a uma PEC.

Retorna o `id` de cada votação (string, ex.: "2611313-34"), necessário para
`detalhar_votacao`, `listar_votos_votacao` e `listar_orientacoes_votacao`.
ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
max_itensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

Sem anotações, a descrição deveria declarar que é uma operação de leitura e sem efeitos colaterais. O nome 'lista' sugere, e a descrição menciona apenas o retorno de IDs, sem detalhar permissões, paginação ou limitações.

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

Conciseness5/5

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

Duas frases objetivas, sem redundância; a informação essencial (que lista votações e retorna IDs) está no início, e o parágrafo adicional dá contexto útil sem alongar.

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

Completeness3/5

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

A ferramenta é simples, mas a falta de explicação dos parâmetros (especialmente 'max_itens') é uma lacuna. O output schema cobre o retorno, mas o agente não saberá o significado exato do ID de entrada nem como controlar quantidade de resultados.

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

Parameters2/5

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

Com 0% de cobertura no schema, a descrição não compensa: não explica que o parâmetro 'id' se refere ao ID da PEC nem o efeito de 'max_itens' (padrão 100). Apenas o retorno de ID é mencionado, não os parâmetros de entrada.

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?

Descreve acção específica — listar votações de uma PEC — e identifica o propósito dos IDs retornados, diferenciando-o dos siblings de detalhe e de listagem de votos.

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

Usage Guidelines4/5

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

Indica o contexto (votações de uma PEC) e explica que os IDs são usados por três ferramentas a jusante, mas não menciona explicitamente quando não usar ou alternativas. Possui contexto claro, sem exclusões.

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

listar_votos_votacaoA

Lista o voto nominal de cada deputado em uma votação.

Cada item traz o nome do deputado, partido, UF e o `tipoVoto`
(Sim/Não/Abstenção/Obstrução/Artigo etc.). Só há votos nominais em votações
por registro eletrônico (votações simbólicas retornam lista vazia).
ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
max_itensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It clearly discloses an important edge case (symbolic votings return empty) and describes the content of each item. It stops short of covering auth, ordering, or pagination behavior, but the output schema likely covers the return structure.

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

Conciseness5/5

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

Three short sentences, each earning its place: the core purpose, the returned item fields, and the symbolic-voting caveat. There is no filler or redundant restating of the tool name.

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

Completeness3/5

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

For a simple two-parameter list tool, the description covers purpose, item shape, and the key edge case; the output schema handles return fields. However, the 0% schema parameter coverage and lack of explicit parameter explanation leave `max_itens` and alternative routing incomplete.

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

Parameters2/5

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

Schema description coverage is 0% and the description does not explicitly define `id` or `max_itens`. `id` is inferable as the voting ID from 'em uma votação', but `max_itens` is left entirely to inference, including what it caps and whether it controls pagination.

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?

The description opens with a specific verb ('Lista') and a precise resource: the nominal vote of each deputy in a given voting. It lists the returned fields (deputy name, party, UF, tipoVoto), which makes it clearly distinguishable from siblings like listar_votacoes_pec or listar_orientacoes_votacao.

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?

The description implies when the tool is useful by stating that only electronic-record votings have nominal votes and symbolic votings return an empty list. It does not explicitly name alternatives or state when to prefer a sibling tool, so the guidance is present but implicit.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 8 tool updatesv0.1.0
    • First observeddetalhar_pec
    • First observeddetalhar_votacao
    • First observedlistar_autores_pec
    • First observedlistar_orientacoes_votacao
    • First observedlistar_pecs
    • First observedlistar_tramitacoes_pec
    • First observedlistar_votacoes_pec
    • First observedlistar_votos_votacao

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation5/5

Each tool targets a distinct resource and action (list/detail PECs, authors, history, votes, orientations). There is no ambiguity or overlap between tools, and the descriptions clearly tie each tool to its unique role.

Naming Consistency4/5

All names use a snake_case verb_noun pattern with the verbs listar/detalhar, which is highly predictable. The only minor inconsistency is pluralization (listar_pecs vs listar_autores_pec), but this does not confuse the overall convention.

Tool Count5/5

8 tools is well-scoped for a PEC-focused legislative server: enough to cover discovery, detail, authors, history, and voting workflows without unnecessary bloat. Each tool earns a clear place.

Completeness5/5

The tool surface provides a complete read-only lifecycle for PECs: list and search, full detail, authors, procediment history, voting events, individual votes, and party orientations. No obvious gaps prevent an agent from answering typical PEC-related queries.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    Not graded
    maintenance
    Enables interaction with the Brazilian Chamber of Deputies Open Data API, providing access to information about legislators, legislative proposals, voting records, events, committees, and parliamentary activities through 57 typed and validated tools.
    63
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to query Brazilian Senate data including senators, bills, voting records, committees, and plenary sessions through natural language.
    9 npm
    6
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for the Brazilian Chamber of Deputies open-data API, enabling search and retrieval of federal legislative bills and their status.
    15
    42 PyPI
    1
    Apache 2.0