Skip to main content
Glama

Consultar situação do BP-e (bpeConsultaBP)

bpe_consultar_situacao

Checks the status of a Brazilian Electronic Passenger Ticket (BP-e) by its 44-digit access key and limits repeated queries to 10 per key per hour.

Instructions

Consulta a situação de um BP-e pela chave de 44 dígitos. Bloqueia localmente acima de 10 consultas/hora da mesma chave (CI03).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chBPe": "<chBPe>"
    },
    "name": "bpe_consultar_situacao"
  }
}

Input Schema

NameRequiredDescriptionDefault
chBPeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose a real constraint: a local block above 10 queries per hour for the same key (CI03). However, it never says the tool is read-only, what happens on the wire when the limit trips (error type/message), or whether the block is time-based or permanent — gaps that matter for an agent that may retry.

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 sentences, zero filler: the purpose and the addressing key come first, and the rate-limit caveat follows. Every clause carries information an agent would otherwise have to guess.

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?

The tool is simple (one required param, no nested objects), but there are no annotations and no output schema, so the description should explain what comes back (status code, motive, protocol data) and any auth prerequisites. It covers the request side and the rate limit competently, but leaves the response shape and failure modes undocumented.

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%, but the single parameter's schema already encodes the format via pattern ^\d{44}$, and the description's "chave de 44 dígitos" largely restates that. It adds the domain name "chave" (access key) which helps an agent understand what the string represents, but offers no format examples, validation behavior, or error condition for a malformed key.

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

Purpose4/5

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

The description names a specific verb ("Consulta") and a specific resource ("situação de um BP-e") plus the identifying input ("chave de 44 dígitos"), so an agent can tell it reads the state of a single document. It stops short of differentiating itself from the close sibling bpe_consultar_status, leaving the boundary between "situação" and "status" to inference.

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?

There is no explicit when-to-use statement, no when-not-to-use condition, and no alternative tool is named — notable given the near-identical sibling bpe_consultar_status. The only implicit guidance comes from the phrasing "pela chave de 44 dígitos", which merely restates the required input.

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