Skip to main content
Glama

Bot do Afiliado

Converter links de afiliado

convert_links
Read-only

Converte um ou vários links (URLs de produtos/lojas) em links de afiliado do seu bot. OBRIGATÓRIO informar "url" (um único link) ou "urls" (vários, até 150 por chamada). Link sem https:// e pontuação colada ao copiar de um texto são corrigidos; o que não for URL volta em "invalid_urls" e o resto do lote converte normalmente. Retorna JSON com affiliate_url e final_url por item (final_url é o link a publicar).

Input Schema

NameRequiredDescriptionDefault
urlNoUm único link a converter (URL completa, com https://).
urlsNoVários links a converter (até 150 por chamada; para mais, divida em lotes).
telegram_user_idNoOpcional. ID do usuário do Telegram para tracking por usuário.

Output Schema

NameRequiredDescriptionDefault
itemsNoUm item por link no lote, com url_original, affiliate_url e final_url.
successNo
final_urlNoLink a publicar (um link).
invalid_urlsNoItens de "urls" que não são link: index e value.
affiliate_urlNo

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?

Goes well beyond the thin annotations by disclosing normalization behavior (missing https:// and trailing punctuation are fixed) and partial-failure semantics (non-URLs land in 'invalid_urls' while the rest of the batch still converts). That is exactly the operational context an agent needs and cannot get from readOnlyHint/destructiveHint/openWorldHint.

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?

Four dense sentences in a sensible order: purpose, input requirement, normalization/error behavior, return shape. The return-format sentence is partly redundant with the output schema, but 'final_url é o link a publicar' adds a genuine usage cue rather than restating fields.

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?

With full schema coverage, an output schema, and annotations covering safety, the description fills the remaining gaps: exclusivity of the two input modes, batch limits, normalization, and per-item error handling. Nothing needed to invoke it correctly is missing.

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 real meaning the schema cannot express: 'url' and 'urls' are mutually exclusive and one of them is mandatory, plus the per-call batch ceiling. 'telegram_user_id' is left entirely to its schema entry, which is acceptable.

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 ('Converte ... links ... em links de afiliado do seu bot') and clarifies the input domain (URLs de produtos/lojas). No sibling tool does conversion, and the description makes that role unmistakable at a glance.

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?

Explicitly states the input contract ('OBRIGATÓRIO informar url ou urls') and the batching rule (up to 150 per call, split larger sets), which is actionable guidance. It stops short of naming when not to use it or pointing to a sibling, but no conversion alternative exists in the sibling list.

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