Skip to main content
Glama

listar_contatos

Find WhatsApp contacts by partial name or number to identify whether each person is you, a team member, or a client, and get their DM JID and slug for reading messages.

Instructions

Acha QUEM é quem: nome, papel (me = você, team = seu time, client = cliente), jid de DM e o slug da DM pronto pra ler_mensagens. Telefone e LID da mesma pessoa vêm numa linha só. PASSE busca (pedaço do nome ou o número, com ou sem formatação/nono dígito) — a conta pode ter milhares de contatos e sem filtro só vêm os 100 primeiros. Se você JÁ TEM o número, nem precisa: a DM é o slug dm-<55DDDnúmero> direto em ler_mensagens/responder.

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": "listar_contatos"
  }
}

Input Schema

NameRequiredDescriptionDefault
buscaNopedaço do nome ou número (ex.: 'ana', '+55 11 98765-4321')
limiteNomáximo de pessoas (default 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/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: it discloses the 100-record truncation default, the underlying scale (thousands of contacts), and that phone and LID for the same person are merged into a single line. These are exactly the silent behaviors that would otherwise cause an agent to misread results.

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-loads the return shape, then the must-pass rule, then the shortcut for the already-known-number case — a sensible escalation. It is dense with parentheticals and internal jargon (jid, LID, slug), but every sentence carries operational value, so the density is earned rather than padded.

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?

No output schema exists, so the description must describe the return value, and it does precisely — field names plus the role enum values plus the slug format ready to hand to ler_mensagens. For a two-parameter read tool, an agent has everything needed to call it and interpret the result.

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 baseline is 3, but the description adds real meaning: `busca` matches a name fragment or a number in any formatting and with or without the ninth digit, and it explains the consequence of omitting it. `limite` is only indirectly conveyed through 'só vêm os 100 primeiros', leaving the reader to infer the override.

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?

Opens with a concrete verb+resource framing ('Acha QUEM é quem') and enumerates exactly what is returned: name, role (me/team/client), DM jid and the DM slug. That vocabulary lets an agent distinguish it immediately from siblings like ler_mensagens or buscar, which consume rather than produce contacts.

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 conditional guidance in both directions: always pass `busca` because an unfiltered call returns only the first 100 of potentially thousands, and if the number is already known, skip this tool entirely and use the `dm-<55DDDnúmero>` slug with ler_mensagens/responder. That is explicit when-to-use and when-not-to-use with named alternatives.

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