Skip to main content
Glama

Definir template de mensagem do bot

set_template
DestructiveIdempotent

Cria/atualiza (SOBRESCREVE) um template do bot. Aceita o FORMATO das ofertas (format.oferta, format.oferta.multi, format.cupom.single, format.cupom.multi, format.post.footer e rodapé por marketplace format.post.footer.{loja}) E as mensagens de RESPOSTA seguras: boas-vindas/uso de comando (command.), carregando (status.), sucesso (success.), entrega de link (message.link.), modo inline (inline.) e respostas em grupo (aliexpress.). NÃO edita mensagens de erro/permissão (error.*) nem comandos administrativos (broadcast, feature, template, métricas, admin) — esses são rejeitados. Variáveis comuns: {titulo} {preco} {link} {cupom} {itens} {footer} {cta} {nome} {@usuario}. Confirme com o usuário antes de sobrescrever.

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": {
      "key": "<key>",
      "text": "<text>"
    },
    "name": "set_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesChave do template. Ex.: format.post.footer.shopee, command.start.welcome, status.offer.loading. (error.* e comandos admin são bloqueados.)
modeNoModo de formatação. Padrão: html.html
textYesTexto do template (HTML do Telegram), com as variáveis entre chaves. Máx. 4096 caracteres (limite do Telegram).

Output Schema

NameRequiredDescriptionDefault
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, so the capitalised 'SOBRESCREVE' is partly redundant, but the description adds real behavior: the overwrite is whole-value replacement, specific key families are rejected, and user confirmation is required. Missing details on auth requirements or what happens to omitted fields, but the destructive profile is well covered.

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 the overwrite warning, then dense but scannable key lists. The long parenthetical enumerations are wordy but each item carries validation value; only minor tightening is possible.

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?

An output schema exists and the schema fully documents all three params, so the description only needed to supply scope, rejection rules and confirmation guidance — which it does. Permission/auth prerequisites and the effect on existing overrides are the remaining gaps.

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 baseline is 3; the description goes beyond it by enumerating the accepted key namespaces and the supported variables ({titulo} {preco} {link} {cupom} {itens} {footer} {cta} {nome} {@usuario}), which materially constrains how the `key` and `text` parameters should be formed.

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+resource ('Cria/atualiza um template do bot') and immediately scopes it to the exact namespaces it touches (format.*, command.*, status.*, success.*, message.link.*, inline.*, aliexpress.*) while naming what it refuses (error.*, admin commands). An agent can distinguish this from get_template and from the admin/command tools without opening the 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 explicit exclusion conditions ('NÃO edita mensagens de erro/permissão ... esses são rejeitados') and a pre-condition ('Confirme com o usuário antes de sobrescrever'), which is the key decision gate for a destructive write. It stops short of pointing at the alternatives (e.g. get_template to read first, preview_userbot_rules to check before applying), so it doesn't earn a 5.

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