Skip to main content
Glama

Converter links de afiliado

convert_links
Read-only

Converte um ou vários links (URLs de produtos/lojas) em links de afiliado da conta, com as credenciais que o usuário cadastrou no painel. 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).

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. Changed1 schema field changed
    • removedInput schema / properties / telegram_user_id
      Removed value: -{
      -  "description": "Opcional. ID do usuário do Telegram para tracking por usuário.",
      -  "type": "integer"
      -}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that stored panel credentials are used, that malformed input (missing https://, trailing punctuation) is auto-corrected, and critically that conversion is partial-success — invalid entries land in "invalid_urls" while the rest of the batch still converts. It also states the response shape and which field is meant for publishing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, then the mandatory-input rule, then edge-case handling, then the return contract — a logical order for an agent to act on. Every sentence carries distinct information; nothing is repeated from the schema or annotations.

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 two-parameter conversion tool with an output schema and annotations already covering the safety profile, the description supplies everything else: credential source, normalization behavior, partial-failure semantics, and batching guidance. No gap remains that would cause an incorrect call.

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%, which already sets a baseline of 3, but the description adds real meaning: the schema marks zero required parameters while the description declares one of "url"/"urls" is mandatory, and it explains batching limits and the corrected-then-returned behavior. This closes a gap the schema leaves open.

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 ("Converte ... links ... em links de afiliado") plus the scope (conta do usuário, credenciais do painel). This is clearly distinct from the read-only siblings get_bot_info, get_product and search_products, so an agent can pick it without opening a 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 mode selection between "url" (single) and "urls" (batch), including the 150-item ceiling and the instruction to split into batches beyond that. It does not name any alternative or exclusion relative to the sibling tools, so usage context is clear but not fully comparative.

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