Skip to main content
Glama

ler_documento

Reads text from received documents such as PDF, DOCX, TXT, or CSV to understand contracts, budgets, and spreadsheets. If no text is extractable, use image reading on the same file.

Instructions

Lê o conteúdo de texto de um documento que o cliente mandou (PDF, .docx, .txt, .csv...). Use quando precisar entender o que diz um arquivo recebido — ex.: contrato, orçamento, planilha exportada. Se vier 'note' avisando que não há texto extraível (PDF escaneado), tente 'ver_imagem' no mesmo arquivo. Sem mediaPath, lê o ÚLTIMO documento do grupo.

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": {
      "grupo": "<grupo>"
    },
    "name": "ler_documento"
  }
}

Input Schema

NameRequiredDescriptionDefault
grupoYesslug do grupo
mediaPathNomediaPath da mensagem (campo 'midia'); ausente = último documento do grupo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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 and does well: it discloses that a 'note' may be returned when no text is extractable, that 'ver_imagem' is the remedy, and that omitting mediaPath silently reads the last document in the group. It does not mention size limits, truncation, or whether the call has side effects, which keeps it short of a 5.

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?

Three short sentences, front-loaded with the core action and followed by usage examples and the fallback path. Every sentence earns its place, though the closing default-behavior sentence duplicates the schema rather than adding new information.

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?

For a two-parameter read tool with no output schema and no annotations, the description covers purpose, supported formats, the empty-text failure mode, the correct fallback sibling, and the default mediaPath behavior. What remains unstated, such as output length or truncation, is minor for this complexity level.

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 100%, so both parameters are already documented in the schema, and the description's final sentence ('Sem mediaPath, lê o ÚLTIMO documento do grupo') essentially restates the schema text for mediaPath. It adds no format or syntax detail beyond the structured fields, so the baseline 3 applies.

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 ('Lê o conteúdo de texto de um documento') and enumerates the supported formats (PDF, .docx, .txt, .csv), so the agent knows exactly what the tool returns. It also implicitly distinguishes itself from 'ver_imagem' by positioning that tool as the fallback for non-extractable text.

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

Usage Guidelines5/5

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

Gives explicit when-to-use guidance ('Use quando precisar entender o que diz um arquivo recebido') with concrete examples (contrato, orçamento, planilha exportada). It also names the alternative to try when the file is a scanned PDF, and explains what happens when no mediaPath is supplied.

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