Skip to main content
Glama

manage_whatsapp_deals

Comprehensive WhatsApp sales funnel deal management tool. A deal is one sales opportunity tied to a WhatsApp contact, sitting in one stage of one pipeline. Supports listing, retrieving, creating, updating, archiving, moving between stages, linking to chats, and fetching event history.

Available actions:

  • list: Retrieve deals with rich filtering (pipeline, stage, status, agent, contact, device, stalled, chatStatus, unread, updatedAfter/Before, pagination)

  • get: Retrieve a single deal by ID

  • create: Create a new deal (requires pipeline, device, contactWid)

  • update: Update deal fields (title, amount, currency, agent, department) - stage moves are NOT here, use move_stage

  • archive: Archive a deal (frees the contact's open-deal slot, preserves as sales history)

  • move_stage: Move a deal to another stage (requires previousStage for atomic compare-and-swap)

  • link_chat: Link a deal to a WhatsApp conversation by contactWid

  • events: Fetch deal event history (limit, skip)

Important notes:

  1. move_stage requires previousStage - the stage the client last saw. The server performs an atomic compare-and-swap and answers 409 when it no longer matches. Always read the deal first (action: 'get') and pass its current stage value.

  2. Only ONE open deal may exist per contact per pipeline. The API answers 409 otherwise, and the check spans the @c.us/@lid identity equivalence.

  3. Restricted agents (plain agent role) only ever see their own deals, regardless of filters.

  4. Write operations (create, update, archive, move_stage, link_chat) require the Professional plan or above. Read operations (list, get, events) are not plan-gated.

Input Schema

NameRequiredDescriptionDefault
cardNoDisplay-only card seed
pageNoPage number (1-based)
sizeNoPage size (default 50)
skipNoNumber of events to skip
agentNoAssigned agent user ID. Filter value on list; on update, pass null to unassign
limitNoNumber of events to return (default 50)
stageNoStage ID within the pipeline
titleNoDeal title (defaults to contact name)
actionYesAction to perform on deals
amountNoDeal amount. On update, pass null to clear it
dealIdNoDeal ID (required for get, update, archive, move_stage, link_chat, events)
deviceNoWhatsApp device ID. A single ID when creating a deal; one or more IDs when filtering a list
statusNoDeal status filter (defaults to open)
unreadNoOnly deals whose conversation has unread messages
chatWidNoWhatsApp ID of the chat the deal was created from
contactNoDeals for one contact (spans @c.us/@lid identity equivalence)
stalledNoDeals stuck in their stage (requires pipeline)
currencyNoISO 4217 currency code. Defaults to the pipeline currency; on update, pass null to clear it
pipelineNoFilter by pipeline ID
chatStatusNoState of the deal's WhatsApp conversation (requires pipeline, only for open deals)
contactWidNoWhatsApp ID of the contact (required for create and link_chat)
departmentNoDepartment ID. On update, pass null to clear it
lostReasonNoReason for losing the deal (only meaningful when moving to a lost stage)
unassignedNoOnly deals with no agent (cannot be combined with agent)
updatedAfterNoISO 8601 date-time, e.g. 2026-08-01T00:00:00.000Z (half-open range [after, before))
previousStageNoThe stage the client last saw (required for move_stage). Must be the current stage value from a prior get. Server answers 409 if stale.
updatedBeforeNoISO 8601 date-time, e.g. 2026-08-01T00:00:00.000Z (half-open range [after, before))
confirmDeletionNoConfirm deal archiving (required for archive action)

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.9/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 well: it discloses atomic compare-and-swap behavior, 409 conflict conditions, identity-equivalence checks, archive side effects, restricted-agent visibility, and Professional-plan gating for write operations. These are exactly the behavioral traits an agent needs before calling the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the tool purpose and a scannable action list, followed by high-value operational notes. Despite being detailed, every section corresponds to actionable invocation or error-prevention information for a complex 28-parameter tool.

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?

Given the tool's complexity, lack of annotations, and lack of an output schema, the description is complete enough for reliable selection and invocation. It covers action semantics, prerequisites, conflict handling, visibility rules, plan gating, and pagination/event options; return payload detail is the only minor omission, but it is not required to call the tool correctly.

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 already 100%, so the baseline is 3. The description adds useful semantic context beyond the schema by mapping parameters to actions: create needs pipeline/device/contactWid, move_stage needs previousStage from a prior get, link_chat needs contactWid, and update excludes stage moves. It does not cover every parameter detail, but it meaningfully improves action-specific parameter interpretation.

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?

Defines the tool as WhatsApp sales funnel deal management and explicitly defines what a deal is, then enumerates specific supported actions. The verb+resource are clear and the action list distinguishes deal operations from sibling areas like pipelines and deal notes.

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?

The action list provides explicit selection guidance, and the notes add when-to-use constraints: move_stage instead of update for stage changes, read/get before move_stage, one open deal per contact per pipeline, and plan gating for writes. It also explains restricted-agent visibility, which prevents incorrect filtering expectations.

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