Skip to main content
Glama

astrea_documento_upload

Anexa um DOCUMENTO a um processo do Astrea (PDF de petição, comprovante, certidão, decisão, etc.). O arquivo fica vinculado ao PROCESSO, na área Documentos (o Astrea não anexa arquivo dentro de um andamento/tarefa, o vínculo é sempre no processo).

  • case_id: id do processo (ver astrea_processos).

  • attachments: um ou mais arquivos. Por arquivo, informe UMA forma: file_url (a plataforma baixa da URL, precisa abrir sem login), upload_id (arquivo já enviado, veja abaixo) ou file_base64 (só arquivo pequeno cujos bytes você REALMENTE tem; NUNCA pra anexo da conversa). file_name é obrigatório com file_url/file_base64.

  • Arquivo ANEXADO na conversa ou no computador do usuário: NÃO tente ler o conteúdo nem montar file_base64 (você recebe o texto extraído, não os bytes do arquivo, e o upload sairia corrompido). Chame esta tool SEM arquivo, passando file_path se souber o caminho do anexo: ela devolve um comando pronto de upload. Execute esse comando no seu sandbox de execução de código (ou peça pro usuário rodar no terminal) e chame de novo com o upload_id E o file_name que ela devolveu. Com vários anexos, passe um item por arquivo (com file_path, se souber) e a tool devolve um comando por arquivo.

  • description: descrição do documento (se omitir, usa o nome dos arquivos).

  • responsible_id: opcional, id do membro responsável (ver astrea_responsaveis); se omitir, fica no usuário da integração.

  • Os mesmos arquivos no mesmo processo nos últimos 30 minutos NÃO são enviados de novo (a resposta vem com duplicado_evitado). Só passe permitir_duplicado=true se o usuário pediu explicitamente outra cópia.

Bulk support: accepts case_ids, responsible_ids for batched execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
case_idYes
case_idsNo
attachmentsYes
descriptionNo
responsible_idNo
responsible_idsNo
permitir_duplicadoNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / attachments / items / properties / file_path
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / attachments / items / properties / upload_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / permitir_duplicado
      Added value: +{
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

With annotations present (readOnly=false, destructive=false, idempotent=false, openWorld=false), the bar is higher, yet the description adds substantial behavior: a 30-minute duplicate-suppression window and the duplicado_evitado response field, the requirement that a file_url must open without login, a small-file constraint on base64, and the two-step command-execution upload workflow. None of this is derivable from the schema or annotations.

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?

Front-loaded with the core purpose, then bulleted by parameter and workflow; dense but every line carries operational content, so length is justified for a 7-parameter tool with a multi-step flow. Minor deduction for the trailing English 'Bulk support' sentence that breaks the language register and is terse relative to the rest.

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?

There is no output schema, so the description must cover enough for correct invocation, and it does: the two-step attachment workflow, dedup behavior, default values, auth-adjacent constraints (URL must open without login), and batch support. An agent has everything needed to call this correctly without opening any sibling.

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 0%, so the description carries the burden, and it does so well: case_id, each attachment mode (file_url/upload_id/file_base64), file_name being required with url/base64, description defaulting to filenames, responsible_id defaulting to the integration user, and permitir_duplicado are all explained, plus a bulk note for case_ids/responsible_ids. Only content_type and upload_code remain undocumented, keeping this just short of a 5.

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 ('Anexa um DOCUMENTO a um processo do Astrea') with concrete examples of document types, and immediately distinguishes itself from the sibling astrea_documento_gerar by clarifying this is attachment, not generation. It further clarifies a scoping subtlety — that the file links to the PROCESSO, never to an andamento/tarefa — which helps an agent route correctly among the many astrea_* siblings.

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?

It gives explicit selection rules between file_url, upload_id and file_base64, plus a dedicated when-not clause: if the file is a conversation/computer attachment, do NOT read content or build base64, instead call the tool without a file and execute the returned command. The duplication policy (same files within 30 min, use permitir_duplicado=true only on explicit request) is a clean usage condition. Nothing 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.