Skip to main content
Glama

mensagem_list

Lê as mensagens de uma conversa, das mais novas para as mais antigas. Informe conversa_id OU contato_id (com contato_id lê a conversa individual mais recente do contato; ache o contato com contato_list). Para ver mais antigas, repita com antes_de = proximo_cursor. Mensagens com mídia trazem tipo e media_url (link direto válido por 2 horas, até media_url_expira_em; depois disso chame mensagem_list de novo para um link novo): para reenviar essa mídia, passe a media_url em midia_url no mensagem_send. Áudios já transcritos trazem o texto em transcricao. Para saber o que foi dito num áudio sem texto, chame de novo com transcrever_audios = true: os áudios da página são transcritos na hora (cerca de metade da duração de cada áudio, até uns 40 segundos por chamada); os que não couberem voltam com transcricao_pendente = true, e basta chamar de novo.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mensagem_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
antes_deNo
contato_idNo
conversa_idNo
transcrever_audiosNoTranscreve os áudios desta página que ainda não têm texto.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/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 so thoroughly: it discloses the read direction, cursor-based pagination, that media links are direct but expire after 2 hours (with the media_url_expira_em field to check), and that transcription is synchronous with roughly half the audio duration, capped near 40 seconds per call, with overflow marked transcricao_pendente. These are exactly the behavioral traits an agent needs to plan retries and avoid using stale links.

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?

Dense but essentially waste-free — every clause conveys an operational fact (routing, pagination, link expiry, transcription latency). It is delivered as one long block, so the media and audio-transcription guidance would be easier to scan if separated from the core read/pagination sentence.

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 no output schema, the description usefully names the returned fields an agent must act on (tipo, media_url, media_url_expira_em, transcricao, transcricao_pendente), which is what makes correct chaining possible. Minor gap: nothing states the default or maximum page size, so an agent cannot predict how many messages one call returns before paging.

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 only 20%, but the description compensates by explaining conversa_id vs contato_id semantics, antes_de as a pagination cursor tied to proximo_cursor, and transcrever_audios as on-demand transcription of the current page. The only parameter left undefined anywhere is limit, whose page-size behavior and default are never mentioned.

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?

The description opens with a specific verb and resource ("Lê as mensagens de uma conversa") plus ordering ("das mais novas para as mais antigas"), which immediately separates it from siblings like conversa_list or contato_list. An agent knows exactly what this returns without opening the schema.

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 explicitly states the selection rule between the two identifiers (conversa_id OR contato_id, with contato_id reading the contact's most recent individual conversation) and routes the agent to contato_list to resolve a contact. It also gives the follow-up path for older pages (antes_de = proximo_cursor) and for resending media (midia_url in mensagem_send), covering when and how to chain calls.

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.

Resources