Skip to main content
Glama

Create hotel payment link

create_payment
Destructive

Cria o pedido e devolve o LINK DE PAGAMENTO. O hospede abre o payment_url e paga na pagina do gateway — NUNCA peca ou digite dados de cartao aqui na conversa. A reserva no fornecedor so e efetivada depois do pagamento confirmado (acompanhe com get_order_status).

hospedes: uma entrada {firstName, lastName} para CADA hospede (adultos + criancas — o
total tem que bater com adults+len(children_ages) da busca).
telefone: OBRIGATORIO — e como a operacao fala com o hospede se a reserva der problema.
Peca o numero com DDI/DDD.
metodo: so vale quando a tarifa e BRL (Mercado Pago) — o meio que o HOSPEDE escolheu
depois de ver os dois precos do get_quote: 'cartao' (cobra `preco_cartao`, ate 12x sem
acrescimo nas parcelas; e o padrao; 'parcelado' e o mesmo) ou 'pix' (cobra `preco_pix`).
O link aceita so aquele meio. Para trocar de meio, chame create_payment de novo com o
outro: o link anterior deixa de valer (pagamento nele e estornado). Em USD nao se
aplica: o Stripe cobra em cartao internacional.

locale: idioma do hospede — 'pt', 'es' ou 'en' (o mesmo da conversa e do language da
busca). A pagina de pagamento, os e-mails (confirmacao, estorno) e o voucher saem nele;
sem ele, vale o idioma da busca.

cpf: CPF de quem esta fazendo a reserva (o responsavel, um por pedido; com ou sem pontos).
OBRIGATORIO quando o get_quote devolver `exige_cpf` ou `exige_endereco` (hospede de
nacionalidade BR em hotel no Brasil); nos demais casos nao envie — e ignorado. Peca ao hospede; nunca
invente. Sem ele (ou invalido) a API devolve cpf_obrigatorio / cpf_invalido.

endereco: endereco completo de quem esta fazendo a reserva (o mesmo responsavel do CPF), objeto
{cep, logradouro, numero, complemento (opcional), bairro, cidade, uf}; cep com 8 digitos (com ou
sem hifen), numero pode ser "S/N", uf com 2 letras (ex.: SP). OBRIGATORIO quando o get_quote
devolver `exige_cpf` ou `exige_endereco`; nos demais casos nao envie — e ignorado. Peca ao
hospede; nunca invente. A API devolve endereco_obrigatorio / endereco_invalido se faltar ou for torto.

A resposta traz `order_id` (uso interno) — o NUMERO DE CONFIRMACAO que o hospede deve
guardar (BH4-XXXXXXXX) aparece em get_order_status assim que o pagamento confirma. Em
BRL traz tambem `metodo` e `brl_total` (o valor que o link cobra): confirme ao hospede.

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": {
      "token": "<token>",
      "search_id": "<search_id>",
      "opcao_id": "<opcao_id>",
      "hospedes": "<hospedes>",
      "email_contato": "<email_contato>",
      "telefone": "<telefone>"
    },
    "name": "create_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
cpfNo
paisNo
tokenYes
cidadeNo
localeNo
metodoNo
enderecoNo
hospedesYes
opcao_idYes
telefoneYes
search_idYes
nome_contatoNo
email_contatoYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / properties / cpf / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / email_contato / type
      Removed value: -"string"
    • addedInput schema / properties / endereco
      Added value: +{
      +  "default": null,
      +  "title": "Endereco"
      +}
    • removedInput schema / properties / hospedes / items
      Removed value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}
    • removedInput schema / properties / hospedes / type
      Removed value: -"array"
    • removedInput schema / properties / telefone / type
      Removed value: -"string"
  2. Changed1 schema field changed
    • addedInput schema / properties / cpf
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cpf"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotent=false, and the description adds the concrete mechanism behind those flags: re-calling with another method voids the previous link and refunds payments on it, and the supplier booking only becomes effective after payment confirmation. It also discloses error codes the API returns (cpf_obrigatorio, cpf_invalido, endereco_obrigatorio) and the fact that the human-readable confirmation number only appears later in get_order_status. No contradiction with the annotations.

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 and the payment-link workflow, then organized one parameter per paragraph, so the dense blocks are scannable. It is long, and some clauses (restating the 12x parcelamento detail, repeating "Peca ao hospede; nunca invente" twice) could be compressed, but virtually every sentence carries operational meaning.

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?

For a destructive, non-idempotent payment tool with no output schema, the description covers the safety-critical surface: conversation-level data handling, conditional prerequisites from get_quote, error responses, and the meaning of the returned order_id/metodo/brl_total including where the confirmation number shows up. The remaining gap is the identity/plumbing parameters (token, search_id, opcao_id, email_contato) that an agent must still guess at.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the entire burden — and it does well for the high-risk parameters, spelling out hospedes cardinality rules, telefone being mandatory with DDI/DDD, metodo enum values and which price each charges, locale effects on page/emails/voucher, and the cpf/endereco conditional requirements with format constraints. However token, search_id, opcao_id, email_contato, nome_contato, pais and cidade are never explained, leaving roughly half of the 13 parameters undocumented anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a concrete verb+resource ("Cria o pedido e devolve o LINK DE PAGAMENTO") and makes the core mechanism explicit: the guest opens `payment_url` and pays on the gateway page. It also scopes the tool to hotel reservations in Brazil ("hotel no Brasil"). It stops short of 5 because the sibling relationship to create_activity_payment/create_transfer_payment is only carried by the title, not stated in the description.

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?

Extremely prescriptive about when and how: use `metodo` only for BRL fares, call create_payment again to switch methods instead of doing it elsewhere, follow up with get_order_status, send cpf/endereco only when get_quote returns exige_cpf/exige_endereco, and never collect card data in the conversation. It even explains downstream consequences of the choice (USD goes through Stripe international card).

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