Skip to main content
Glama

Comprar créditos para esta API key

comprar_creditos

Para cuando el usuario pide comprar o recargar créditos: devuelve los packs disponibles y una checkout_url (Polar, tarjeta) para la key actual, que la persona abre para pagar; al pagar, los créditos se acreditan solos. No cobra ni mueve dinero por sí misma. Sin costo.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "comprar_creditos"
  }
}

Input Schema

NameRequiredDescriptionDefault
creditsNoCantidad deseada; se elige el pack más chico que la cubre
product_idNoElegir un pack puntual (de la lista)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / credits / maximum
      Added value: +9007199254740991
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, it discloses the full behavior chain: payment happens out-of-band in Polar by card, the agent gets a URL rather than charging anything, credits are credited automatically on payment, and there is no cost to the call. This genuinely clarifies the non-destructive, non-charging nature of a tool whose readOnlyHint is false.

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?

It is front-loaded with the usage trigger, then the effect, then the caveats, in a compact form with no filler. The trailing 'Sin costo' is slightly redundant with 'No cobra ni mueve dinero por sí misma' but reinforces an important safety point.

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?

There is no output schema, and the description covers the return payload (packs and checkout_url) and what the user must do next, which is exactly what an agent needs to relay to the user. Nothing essential for correct invocation is missing given the two optional parameters.

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 100%, so both parameters (credits, product_id) are already documented, including the 'smallest pack that covers it' rule. The description adds no extra semantics about how credits and product_id interact or which takes precedence.

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?

The description states a concrete effect: it returns the available credit packs plus a checkout_url for the current API key, and credits are auto-applied after payment. That distinguishes it from siblings like consultar_saldo (which reads balance) without needing to open any 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?

The trigger is explicit: 'Para cuando el usuario pide comprar o recargar créditos' tells the agent exactly which user intent selects this tool. It does not name a sibling alternative or an exclusion case (e.g., when to check balance first instead), which keeps it short of a 5.

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