Skip to main content
Glama

TreinoAI

Enviar mensagem a um cliente

enviar_mensagem
DestructiveIdempotent

Envia uma mensagem do treinador para um cliente, na conversa do app do TreinoAI (nunca pelo WhatsApp). O cliente recebe uma notificação e lê a mensagem no app. Cada treinador envia no máximo 30 mensagens por minuto, somando o painel e as conexões. Isso chega ao cliente e não se desfaz por esta conexão, então cada chamada precisa da confirmação do treinador. Exige chave_idempotencia: repetir o mesmo pedido com a mesma chave devolve a mensagem já enviada, sem mandar de novo.

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": {
      "chave_idempotencia": "<chave_idempotencia>",
      "cliente_id": "<cliente_id>",
      "texto": "<texto>"
    },
    "name": "enviar_mensagem"
  }
}

Input Schema

NameRequiredDescriptionDefault
textoYesO texto da mensagem, como o cliente vai ler.
cliente_idYesId do cliente. Encontre-o com buscar_dados_do_time (entity "clients").
chave_idempotenciaYesUma chave nova para cada pedido (por exemplo um UUID). Para repetir o mesmo pedido, como depois de uma falha de conexão, use a mesma chave: o resultado anterior volta e nada é criado de novo. A mesma chave com um pedido diferente é recusada. Vale por 30 dias.

Output Schema

NameRequiredDescriptionDefault
linkYes
repetidaYes
conversa_idYes
mensagem_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the client notification behavior, a concrete rate limit (30 messages/minute per trainer, panel plus connections combined), and the irreversible delivery ("Isso chega ao cliente e não se desfaz por esta conexão"), which is the operational meaning behind destructiveHint=true. It also spells out the idempotency contract rather than leaving the agent to infer it from idempotentHint.

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?

Four sentences, front-loaded with the action and channel, then notification, rate limit, irreversibility, and idempotency in a logical order. The closing idempotency sentence partially duplicates the schema field text, which is the only waste.

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?

An output schema exists, so return values need no explanation. For a destructive, rate-limited send operation, the description covers channel, delivery, confirmation requirement, throttling, and idempotency key semantics – everything an agent needs to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and cliente_id even carries the discovery hint (buscar_dados_do_time). The description's explanation of chave_idempotencia largely restates the schema field description (same key returns prior result, different request with same key refused), adding little beyond it, so the baseline applies.

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 and resource ("Envia uma mensagem do treinador para um cliente") and pins down the channel ("na conversa do app do TreinoAI (nunca pelo WhatsApp)"). That channel exclusion is exactly what separates it from any other messaging path an agent might assume.

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 clear context for use: trainer-to-client, in-app only, and each call requires trainer confirmation before sending. It does not name an alternative tool for other channels or a when-not case, so it stops short of full routing guidance, but the operating conditions are unambiguous.

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