Skip to main content
Glama

Gerar markdown

gerar_markdown

Buys individual access to the document for US$ 0.02/page, through x402/credit. Each buyer pays, even when the text is ready. Check GET or the 402, confirm pages/hash/total and send cotacao. The account session (cookie + browser CSRF) records the purchase in the global right of the account before the delivery, without a separate code; with the edm_… guest (Bearer), the right is the guest's and the code comes along; an agent uses X-Credito. Without an account, keep acesso.codigo to reopen or to link later. After the link, only the account opens it. A ready text reuses the OCR; a necessary generation is included. An unknown/changed quote does not charge. 152 pages = US$ 3.04. Body up to 4096 bytes. After a 202, follow up through GET. Paid and the recording of the right failed: 502 pago_nao_registrado with the recibo; keep it, and support delivers or refunds.

Input Schema

NameRequiredDescriptionDefault
idYesPositive ID of the document returned by the procurement.
cotacaoNoObject received in the GET/402: paginas, source_sha256 and preco_total_usd must match the current quote. Required when you send a payment authorization.
agent_passNoIndividual agent credential, required together with X-Editalmd-Avaliacao.
idempotenciaNoAttempt key, up to 80 characters; keep it in credit retries of the same document.
acesso_codigoNoPrivate code in acesso.codigo after a payment by someone not signed in to the account; up to 4096 characters. It authorizes this document for whoever holds it. A purchase made with the account session issues no code: the global right of the account (HttpOnly cookie) applies, and the right of the edm_… guest applies with its token. A public receipt does not grant access.
credito_tokenNocred_… token to deduct from the balance, as an alternative to x402.
avaliacao_codigoNoevaluation.access_code of the sponsored premium, only for this document and agent, with an expiry. Use it together with X-Agent-Pass; it is not a receipt or a purchase.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • changedInput schema / properties / acesso_codigo / description
      Previous value: -"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige a sessão da conta compradora (cookie HttpOnly); código sozinho e recibo público não concedem acesso."New value: +"Código privado em acesso.codigo após pagamento de quem não está na conta; até 4096 caracteres. Autoriza este documento ao portador. Compra feita com a sessão da conta não emite código: vale o direito global da conta (cookie HttpOnly), e o do convidado edm_… vale com o token. Recibo público não concede acesso."
  4. Changed2 schema fields changed
    • addedInput schema / properties / agent_pass
      Added value: +{
      +  "description": "Credencial individual do agente, obrigatória junto de X-Editalmd-Avaliacao.",
      +  "type": "string"
      +}
    • addedInput schema / properties / avaliacao_codigo
      Added value: +{
      +  "description": "evaluation.access_code do premium patrocinado, exclusivo deste documento e agente, com expiração. Use junto de X-Agent-Pass; não é recibo ou compra.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / acesso_codigo / description
      Previous value: -"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige a sessão da conta MM compradora (cookie HttpOnly); código sozinho e recibo público não concedem acesso."New value: +"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige a sessão da conta compradora (cookie HttpOnly); código sozinho e recibo público não concedem acesso."
  6. Changed1 schema field changed
    • changedInput schema / properties / acesso_codigo / description
      Previous value: -"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige sessão da conta compradora (Bearer sess_… ou cookie HttpOnly); código sozinho e recibo público não concedem acesso."New value: +"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige a sessão da conta MM compradora (cookie HttpOnly); código sozinho e recibo público não concedem acesso."
  7. Changed3 schema fields changed
    • changedInput schema / properties / acesso_codigo / description
      Previous value: -"Código privado em acesso.codigo após pagamento x402/crédito ou confirmação do depósito. Até 4096 caracteres, vinculado a este documento. Browser usa cookie HttpOnly equivalente; recibo público não concede acesso."New value: +"Código privado em acesso.codigo após pagamento; até 4096 caracteres. Enquanto anônimo, autoriza este documento. Após POST /vincular, exige sessão da conta compradora (Bearer sess_… ou cookie HttpOnly); código sozinho e recibo público não concedem acesso."
    • addedInput schema / properties / credito_token
      Added value: +{
      +  "description": "Token cred_… privado. Enviado em X-Credito, preservando a sessão Bearer do pedido MCP.",
      +  "type": "string"
      +}
    • addedInput schema / properties / idempotencia
      Added value: +{
      +  "description": "Chave da tentativa de crédito, até 80 caracteres; conserve ao repetir.",
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • addedInput schema / properties / acesso_codigo
      Added value: +{
      +  "description": "Código privado em acesso.codigo após pagamento x402/crédito ou confirmação do depósito. Até 4096 caracteres, vinculado a este documento. Browser usa cookie HttpOnly equivalente; recibo público não concede acesso.",
      +  "type": "string"
      +}
  9. Added

TDQS

B3.1/5.0
Behavior4/5

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

With only generic annotations (readOnlyHint=false, destructiveHint=false), the description carries the behavioral load and does it well: per-page pricing, no charge on an unknown/changed quote, 202-then-GET follow-up, 502 pago_nao_registrado with recibo for refund/support, and how the purchase is recorded against the account/guest right. It states consequences and failure modes rather than just restating the mutation hint, though the delivery/return shape is never described.

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

Conciseness2/5

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

A dense run-on block of payment jargon that is not front-loaded: the first thing the agent reads is a price, not what the tool produces. Sentences like 'with the edm_… guest (Bearer), the right is the guest's and the code comes along' pack several distinct rules without structure, forcing re-parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, stateful operation with no output schema, the description does cover charging rules, retry/idempotency behavior, and error paths. It still omits what a successful response contains, how the markdown is delivered (inline vs. via get_tender_markdown), and how it relates to generation_status or document access siblings.

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 coverage is 100%, so the baseline is 3. The description adds a little beyond the schema — confirming pages/hash/total against the quote, noting guest Bearer vs X-Credito vs account session, and warning to retain acesso.codigo — but it leaves several of the seven parameters (agent_pass, avaliacao_codigo, idempotencia) to the schema alone.

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

Purpose3/5

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

The opening sentence describes a commercial transaction ('Buys individual access to the document for US$ 0.02/page') rather than the operation itself; the actual purpose only surfaces obliquely in 'A ready text reuses the OCR; a necessary generation is included.' Nothing distinguishes it from siblings like get_tender_markdown, documento_acesso or get_document, so the agent must infer this is the paid markdown generation endpoint.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is real usage context: send cotacao when authorizing payment, follow up a 202 via GET, keep acesso.codigo for later reopening, and choose between x402, credito_token, and guest/agent credentials. However, there are no explicit when-to-use/when-not rules relative to the several sibling tools that also expose document access.

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.