Skip to main content
Glama

TreinoAI

Criar programa

criar_programa
Idempotent

Cria um programa na biblioteca do time a partir de um esboço: semanas, sessões e exercícios (pelo id ou pelo nome exato da biblioteca), com séries, repetições, carga e descanso. As sessões são uma semana de treino, repetida pelas semanas do programa. O programa fica só na biblioteca: não é atribuído a nenhum cliente e ninguém é avisado. A carga entra nas observações do exercício, e exercícios por tempo e cardio recebem a duração padrão do tipo. Se algum exercício não for encontrado, nada é criado e a resposta lista cada um com sugestões. Exige chave_idempotencia: repetir o mesmo pedido com a mesma chave devolve o programa já criado.

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>",
      "nome": "<nome>",
      "semanas": "<semanas>",
      "sessoes": "<sessoes>"
    },
    "name": "criar_programa"
  }
}

Input Schema

NameRequiredDescriptionDefault
nomeYesNome do programa.
semanasYesDuração do programa em semanas.
sessoesYesAs sessões de uma semana de treino. A mesma semana se repete por todas as semanas do programa.
descricaoNoDescrição do programa.
objetivosNoObjetivos do programa.
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
versaoYes
semanasYes
sessoesYes
repetidaYes
programa_idYes
exercicios_com_duracao_padraoYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare it is a non-destructive, idempotent, non-open-world write; the description adds the behaviors that matter: load is folded into the exercise notes, timed and cardio exercises get the type's default duration, the program is never assigned or announced to anyone, and a failed exercise lookup aborts the whole creation and returns each miss with suggestions. The idempotency contract (same key replays the prior result, a different payload under the same key is refused, 30-day window) is spelled out explicitly.

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?

The first sentence carries the core purpose and payload shape, then consequences (no assignment, load in notes, all-or-nothing failure, idempotency) follow in a logical order. It is dense with long sentences, but each one contributes a distinct behavioral fact, so nothing is padding.

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 6-parameter nested write tool with an output schema, the description covers everything an agent needs: the draft structure, exercise resolution rules, side effects, failure semantics, and the idempotency requirement. Return-value details can be deferred to the output schema, and the description still explains the error shape.

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 100%, so the baseline would be 3, but the description adds cross-parameter meaning the schema cannot express: the sessions array represents one training week that is repeated across every week of the program, exercises resolve by id or by exact library name, and repetitions must be omitted for timed and cardio work. That clarifies how the nested fields interact rather than restating them.

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 ("Cria um programa na biblioteca do time a partir de um esboço") and immediately scopes the payload to weeks, sessions and exercises with sets, reps, load and rest. It also draws a hard boundary against assignment tools by saying the program is not attached to any client, so an agent can separate it from siblings like atribuir_programa.

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?

Clear on when this is the right call: building a program in the team library from a draft, with no client assignment or notification. It also states the precondition of a chave_idempotencia. It stops short of naming the alternative tool to use when the intent is actually to assign a program to a client, leaving that inference to the agent.

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