Skip to main content
Glama

Ler inteiro teor (PDF)

tse_inteiro_teor
Read-only

Downloads full TSE/TRE decision PDFs and returns their text in chunks, with the first chunk indexing sections so you can retrieve specific votes or divergences.

Instructions

Baixa o inteiro teor em PDF (TSE ou TRE) e devolve o texto, em trechos.

O primeiro trecho de um acórdão longo traz o índice das seções (relatório, votos, vistas, divergências), com a posição de cada uma: para ler um voto, chame de novo com inicio nessa posição. O PDF fica salvo localmente; chamadas seguintes sobre a mesma decisão não baixam de novo. O TSE limita downloads seguidos: o MCP espaça as chamadas e pode demorar alguns segundos.

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_inteiro_teor"
  }
}

Input Schema

NameRequiredDescriptionDefault
inicioNoPosição do primeiro caractere do trecho.
tamanhoNoQuantidade de caracteres do trecho.
codigo_decisaoYescodigoDecisao da decisão.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.1

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, it discloses the PDF is saved locally, that repeat calls on the same decision are served from cache, and that TSE rate-limits consecutive downloads so the MCP spaces calls and may take several seconds. It also explains that the first chunk of a long decision contains the section index, which shapes how an agent should read results.

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?

Front-loaded with the core action, then two short paragraphs covering result structure and caching/rate-limit behavior. No filler sentences; each one carries information an agent needs to call the tool correctly.

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?

With an output schema present, the description needn't document return values, yet it still explains chunking and the section index. Minor gaps remain: nothing about failure modes (PDF unavailable, no extractable text layer) or whether TRE decisions behave differently from TSE.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning about 'inicio': it is a character position that can be set to a section offset from the initial index to jump to a vote. 'tamanho' and 'codigo_decisao' are not elaborated beyond the schema, keeping this short of a 5.

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 states a specific verb+resource: it downloads the full text PDF (inteiro teor) from TSE or TRE and returns the text in chunks. It is clear what the tool produces, but it never names or contrasts the siblings (e.g., tse_obter_decisao) that an agent might pick instead, so the differentiation is only implicit.

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?

It gives concrete in-tool guidance — to read a specific vote, call again with 'inicio' set to that section's position — which is genuinely useful. However, it does not say when to use this tool versus tse_obter_decisao or tse_citacao; the workflow position is left to inference.

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