Skip to main content
Glama

export_contacts

Read-only

Export WhatsApp contacts to CSV or JSON with sorted, deduplicated results; choose fields, filter saved contacts, and exclude non-dialable @lid IDs.

Instructions

Export all WhatsApp contacts as CSV (RFC 4180) or JSON. Deduped, sorted alphabetically by display name. Default format is CSV. JSON projects the requested fields. Available fields: jid, phone, name, pushname, is_my_contact, is_business. WhatsApp "@lid" privacy identifiers (opaque, non-dialable) are always excluded — only real phone-backed contacts are returned.

Examples: CSV all fields: { format: "csv" } JSON name + phone: { format: "json", fields: ["name", "phone"] } Filtered CSV: { format: "csv", query: "Argentina" } Saved contacts only: { format: "csv", is_my_contact: true }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoOptional case-insensitive substring filter (matches name, pushname, phone, JID)
fieldsNoWhitelist of fields to include. Defaults to all six: jid, phone, name, pushname, is_my_contact, is_business
formatNoOutput format. Default "csv"
is_my_contactNoIf true, only contacts saved in the user address book. If false, only un-saved. Omit to include both.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.6

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only cover readOnly/openWorld, but the description adds real behavioral detail: deduped, alphabetically sorted by display name, CSV is the default, JSON projects requested fields, and @lid privacy identifiers are always excluded. That last point is exactly the kind of non-obvious side effect the agent needs.

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 statement and the exclusion rule, then examples. The examples consume a lot of space, but each one demonstrates a distinct parameter combination rather than padding.

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?

With no output schema, the description carries the return-value burden and does so: it names the formats, the field set, sorting, dedup, and the @lid exclusion. An agent can call this correctly without any additional information.

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 value by enumerating the six available fields and demonstrating format/fields/query/is_my_contact combinations. It goes slightly beyond the schema's own descriptions rather than merely repeating them.

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?

States a specific verb+resource (export all contacts) plus the output formats (CSV RFC 4180 / JSON), so the agent knows exactly what it produces. It does not, however, distinguish itself from the sibling list_contacts, which an agent could reasonably confuse it with.

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

Usage Guidelines4/5

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

Four concrete examples map intent to parameter combinations (all fields, field projection, query filtering, saved-only), which is strong implied guidance. It still never says when to prefer this over list_contacts or when not to use it, so it stops short of explicit routing.

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