Skip to main content
Glama

Obter decisão (TSE ou TRE)

tse_obter_decisao
Read-only

Retrieve full Brazilian electoral court decisions by decision code, including ementa, parties, legislation, precedents, and citation details; optionally target TSE or a specific TRE.

Instructions

Ementa e decisão completas de um julgado, com partes, legislação, súmulas, precedentes e citação.

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": {
      "codigo_decisao": "<codigo_decisao>"
    },
    "name": "tse_obter_decisao"
  }
}

Input Schema

NameRequiredDescriptionDefault
tribunalNoOpcional: 'TSE' ou a sigla do TRE (ex.: 'TRE-PE'). Só é usado se a decisão ainda não estiver no cache local; sem ele, a decisão é procurada no TSE e depois nos TREs.
codigo_decisaoYescodigoDecisao informado por tse_pesquisar ou presente no link do portal (?codigoDecisao=...).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and an output schema exists, so the safety profile and return shape are covered elsewhere. The description adds essentially no behavioral context beyond the structured fields - nothing about local cache short-circuiting, fallback order across TSE/TRE, or latency, even though the schema hints at a two-stage lookup.

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?

A single compact sentence with zero filler, front-loading the two most important payload items (ementa and decisão). It is efficient but structurally thin - lacking a verb and any second sentence that would route the agent or flag the cache behavior.

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 two-parameter read-only fetch with full schema coverage and an output schema, the description is adequate on return content. It is incomplete on the things only prose can supply: how it differs from tse_inteiro_teor and the cache/fallback behavior that affects what tribunal actually does.

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 100%, and the schema already explains both codigo_decisao and the optional tribunal fallback. The description contributes no additional parameter meaning, so the baseline 3 applies when the schema does all the work.

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 resource and enumerates its contents (ementa, decisão, partes, legislação, súmulas, precedentes, citação), so an agent can tell it retrieves a full decision record. However, it is a noun phrase with no verb and makes no attempt to distinguish it from the sibling tse_inteiro_teor, which plausibly fetches the same document's full text.

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 when-to-use guidance, no mention of prerequisites, and no reference to alternatives such as tse_inteiro_teor or tse_citacao. The only routing information ('codigoDecisao informado por tse_pesquisar') lives in the schema, not the description, so the prose itself offers no usage direction.

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