Skip to main content
Glama
WACrew: WhatsApp AI automation

WACrew: WhatsApp AI automation

definir_contrato

Set or update a WhatsApp chat's commercial contract state (active, closed, paused, none) with dates, monthly value, note, and message limit so dashboards flag over-contract clients and renewals.

Instructions

Define o estado comercial de um chat: estado (ativo/encerrado/pausado/sem), início e fim (YYYY-MM-DD), valor mensal e nota. Só os campos passados mudam. O dashboard cruza isso com a atividade pra apontar cliente ativo demais pro contrato, renovação próxima e custo por entrega. Pra ler, use a tool dashboard. limite_mensagens = mensagens do cliente em 30 dias que o plano comporta (null tira o limite); acima dele o dashboard aponta acima-do-contrato.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "grupo": "<grupo>"
    },
    "name": "definir_contrato"
  }
}

Input Schema

NameRequiredDescriptionDefault
fimNoYYYY-MM-DD ou null
notaNo
grupoYesslug do grupo ou DM
estadoNo
inicioNoYYYY-MM-DD ou null
valorMensalNoreais por mês, ou null
limite_mensagensNomensagens do cliente em 30 dias que o plano comporta (inteiro ≥ 1); null tira o limite

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.1
    • removedInput schema / properties / fim / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / fim / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / inicio / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / inicio / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / valorMensal / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / valorMensal / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and mostly meets it: "Só os campos passados mudam" discloses partial-update semantics, null handling is stated for limite_mensagens and the dates, and the downstream dashboard effect is explained. Gaps remain around permissions, behavior for unknown chats, and whether the call returns the resulting state.

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 verb and affected fields, then semantics, then the sibling pointer and finally the limit explanation. A few clauses repeat schema-provided detail (enum values, date format), which costs some tightness but does not obscure the message.

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?

For a 7-parameter mutation with no annotations and no output schema, the description covers what changes, how partial updates work, null semantics, and the downstream effect. What is missing is error/edge behavior and any hint about the response, which is a modest gap relative to the tool's complexity.

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 71%, and the description reinforces the important ones while adding consequence-level meaning (limit exceeded → dashboard flags acima-do-contrato; null removes the limit). Some text merely restates schema details like the estado enum and the YYYY-MM-DD format, so it is additive rather than transformative.

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 (define) and resource (commercial state of a chat), enumerates the affected fields, and explicitly separates itself from the read path ("Pra ler, use a tool dashboard"). An agent can tell this apart from dashboard/definir_modo without opening any schema.

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?

Gives a clear when-to-use context (setting commercial state used by the dashboard) and names the alternative for reading. It does not spell out when-not to use it (e.g., chats that don't exist, or bulk updates), but the routing guidance is explicit enough for selection.

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