Skip to main content
Glama

TreinoAI

Atribuir programa a um cliente

atribuir_programa
DestructiveIdempotent

Atribui um programa da biblioteca do time a um cliente. O cliente recebe uma notificação no app e passa a ver o programa. Com quando "agora" (o padrão), o programa começa na hora e encerra o programa em andamento do cliente; com "depois_do_programa_atual", ele entra na fila e começa quando o atual terminar. 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 atribuição já feita, sem avisar o cliente 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>",
      "programa_id": "<programa_id>"
    },
    "name": "atribuir_programa"
  }
}

Input Schema

NameRequiredDescriptionDefault
quandoNo"agora" começa o programa na hora e encerra o programa em andamento do cliente. "depois_do_programa_atual" põe o programa na fila, e ele começa sozinho quando o programa em andamento terminar.agora
cliente_idYesId do cliente. Encontre-o com buscar_dados_do_time (entity "clients").
programa_idYesId do programa da biblioteca do time. Encontre-o com buscar_dados_do_time (entity "programs").
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
na_filaNo
repetidaYes
situacaoYes
versao_idNo
programa_idNo
atribuicao_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare destructiveHint and idempotentHint, but the description adds the concrete consequences: the client is notified, an in-progress program is ended, the assignment persists and cannot be undone through this connection, and each call needs trainer confirmation. It also spells out idempotency-key behavior, including that a repeat does not re-notify the client.

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 action, then the mode semantics, then the safety and idempotency constraints — no wasted sentences. The phrasing 'Com quando "agora"' is slightly garbled, costing some polish.

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?

For a destructive, open-world mutation with an output schema, the description covers side effects, irreversibility, the confirmation requirement, and retry semantics. An agent has everything needed to call it safely without consulting other sources.

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 the schema already documents 'quando' and the idempotency-key semantics in detail. The description largely restates those, adding only the detail that a repeat does not notify the client again; useful, but marginal over structured data.

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 and resource: it assigns a team-library program to a client, and the client then sees it in the app. That is enough to distinguish it from atribuir_formulario, but no sibling is named or contrasted explicitly.

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?

Explains clearly when to use each mode: 'agora' starts immediately and terminates the client's in-progress program, while 'depois_do_programa_atual' queues it. It also flags the trainer-confirmation prerequisite. It stops short of naming alternatives or stating when not to use the tool.

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