Skip to main content
Glama

Executar comando do bot

run_command
Read-only

Executa um comando/gatilho do bot — o MESMO executor do Telegram — e devolve o conteúdo pronto, aplicando o template do bot (TEXTO formatado, não JSON). Ex.: "converter" (alias "c") converte um link como o /c faz; "oferta"/"cupom" montam o post; "coringa"/"addcarrinho" geram links especiais AliExpress; "encurtar" encurta; "soencurtar" só encurta (sufixo opcional do link curto em "text", ex. "Natal" → ofertou.ai/xxxx-Natal); "historico" mostra o histórico de preço; "promo" gera super oferta; "pesquisar" busca. Passe o link em "url"/"urls" ou o texto em "text" (para converter vários links de uma vez, mande-os em "text"). Comandos administrativos (broadcast, feature, template, painel) NÃO são expostos — para templates use get_template/set_template.

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": {
      "command": "<command>"
    },
    "name": "run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
ctaNoOpcional. CTA (chamada para ação) posicionável via a variável {cta} no formato (oferta/cupom); sem {cta}, não aparece. Ex.: "Compre aqui 👇".
urlNoUm link (quando o comando age sobre um produto/loja).
textNoTexto livre (termo de busca ou a mensagem do comando).
urlsNoVários links (até 20; para lotes maiores de conversão, use convert_links).
couponNoCupom (para os comandos oferta/cupom).
commandYesComando/gatilho do bot. Permitidos: converter (alias "c"), oferta, cupom, coringa (link especial AliExpress), addcarrinho (link de adicionar ao carrinho AliExpress; alias "addnocarrinho"), encurtar, soencurtar, moedas, historico, promo, pesquisar, pesquisarcombo (combos), pesquisarmagalu (Magalu), pesquisaralinomagalu (AliExpress via Magalu), pesquisachoice (AliExpress Choice), pesquisabrasil (AliExpress enviado do Brasil). Aliases do Telegram também funcionam.
telegram_user_idNoOpcional. ID do usuário do Telegram para tracking por usuário.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover readOnly/destructive/openWorld, and the description still adds substantial context: the response is bot-templated formatted TEXT, not JSON — a critical fact for an agent's parsing strategy — plus it is the same execution path as the live Telegram bot, so effects are user-visible. It stops short of disclosing rate limits, failure modes, or that 'encurtar' persists a short link.

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 purpose, then examples, then input routing, then exclusions — a sensible order. Some of the command catalogue duplicates the 'command' parameter's schema description, but each entry adds what the command actually does, so the redundancy is largely earned.

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?

Seven parameters and no output schema, so the description must carry the return-value burden — which it does by declaring the output is formatted text built from the bot template. Missing only permission/auth requirements and error behavior for a tool that executes a real bot pipeline.

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 adds real routing semantics on top — 'url'/'urls' for links, 'text' for free text, and the 'soencurtar' suffix convention ('Natal' → ofertou.ai/xxxx-Natal). It slightly conflicts with the 'urls' parameter (schema allows up to 20 links, description says send multiple links in 'text'), which is the only reason this is not a 5.

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 ('Executa um comando/gatilho do bot') and immediately pins down the mechanism: it is the SAME executor used by Telegram. Concrete command examples (converter/c, oferta, encurtar, historico) make it trivially distinguishable from siblings like convert_links or create_offer_post.

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?

Explicit when-to-use via the command catalogue, explicit when-not ('Comandos administrativos (broadcast, feature, template, painel) NÃO são expostos') and explicit rerouting to alternatives: get_template/set_template for templates and convert_links for batches larger than 20. The agent does not have to infer routing.

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