Skip to main content
Glama

Registrar treino feito por um cliente

registrar_treino
DestructiveIdempotent

Registra como concluído um treino pendente que o cliente fez, com as séries (repetições e carga), o PSE de cada exercício e o horário. Envie todos os exercícios do treino, pela posição na ordem do treino; se faltar algum, nada é registrado e a resposta lista os exercícios. Registra só repetições e carga: treinos com exercícios por tempo ou cardio, séries especiais (drop, cluster, rest-pause) ou variações fixadas são recusados e devem ser registrados pelo painel. O treino aparece no histórico do cliente no app. Se ele fechar um mesociclo, o programa ou uma conquista, o cliente é notificado, e as automações do time ligadas a treino concluído rodam. 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 o registro já feito.

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>",
      "sessao_id": "<sessao_id>",
      "inicio": "<inicio>",
      "fim": "<fim>",
      "exercicios": "<exercicios>"
    },
    "name": "registrar_treino"
  }
}

Input Schema

NameRequiredDescriptionDefault
fimYes
inicioYes
sessao_idYesId de um treino pendente do cliente. Encontre-o com listar_dados_do_time (entity "sessions").
exerciciosYesTodos os exercícios do treino, cada um pela posição, com todas as séries e o PSE.
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
situacaoYes
sessao_idYes
cliente_idYes
atribuicao_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses atomic all-or-nothing behavior, downstream side effects (histórico no app, notificação de mesociclo/programa/conquista, automações do time), and irreversibility through this connection. It also explains idempotency semantics in context: repeating the same request with the same chave returns the existing record instead of duplicating.

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?

It is dense but front-loaded: the action and payload come first, then constraints, then side effects, then idempotency. The irreversibility point is stated twice in near-equivalent form (o treino aparece no histórico / isso chega ao cliente e não se desfaz), costing a little economy for a long description.

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, side-effect-heavy write tool, the description covers prerequisites, atomicity, refusal cases, downstream effects, confirmation requirement and idempotency. Return values are not over-explained because an output schema exists, though it still notes that a failed call returns the list of missing exercises.

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 60%, so several parameters are already documented, but the description adds the crucial semantics of posicao (identifies the exercise by its order in the workout, and every position must be present) and of the series payload (only repetições and carga are accepted). It does not add format or range detail for inicio/fim, relying on the schema for those.

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?

The first sentence names a specific verb (registra como concluído) and a precise resource (um treino pendente que o cliente fez), plus the payload it carries (séries, PSE, horário). It also delimits scope by naming what it refuses (exercícios por tempo/cardio, séries especiais, variações fixadas), which effectively separates it from any generation or planning tool.

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?

It states the precondition (treino pendente do cliente), the completeness requirement (envie todos os exercícios, pela posição), the failure mode when incomplete (nada é registrado), and the explicit alternative path for unsupported cases (registrados pelo painel). It adds an operational rule the agent must honor: cada chamada precisa da confirmação do treinador.

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