Skip to main content
Glama

charge

Create payment requests, invoices, or QR codes for transactions by specifying amount, currency, and customer details.

Instructions

Create a payment request, invoice, or QR code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount in cents
currencyNoISO 4217 currency codeBRL
descriptionNoWhat the charge is for
customer_emailNoCustomer email
customer_nameNoCustomer name
expires_inNoSeconds until expiry
providerNoForce a specific provider

Implementation Reference

  • The `charge` method in `WooviProvider` acts as the handler for the charge tool. It prepares the request body, sends a POST request to the Woovi API, and parses the response.
    async charge(req: ChargeRequest): Promise<ChargeResult> {
      const correlationID =
        req.correlation_id ?? `junto-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
    
      const body: Record<string, unknown> = {
        value: req.amount,
        correlationID,
        comment: req.description ?? "Charge via Junto",
      };
    
      if (req.expires_in) {
        body.expiresIn = req.expires_in;
      }
    
      if (req.customer_name || req.customer_email) {
        body.customer = {
          name: req.customer_name,
          email: req.customer_email,
        };
      }
    
      const raw = await this.request("POST", "/charge", body);
      const data = WooviChargeResponse.parse(raw);
    
      return {
        id: correlationID,
        status: data.charge.status ?? "ACTIVE",
        provider: this.name,
        amount: req.amount,
        currency: "BRL",
        payment_link: data.charge.paymentLinkUrl,
        qr_code: data.charge.qrCodeImage,
        br_code: data.brCode ?? data.charge.brCode,
        timestamp: new Date().toISOString(),
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of disclosure but fails to explain side effects (e.g., whether emails are sent), idempotency, or which of the three output types is generated under what conditions. It does not indicate what the tool returns or how expiration behaves.

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

Conciseness3/5

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

The description is a single terse sentence of six words. While it avoids redundancy, it is insufficiently detailed for a financial tool with seven parameters and three potential output variants, leaving critical behavioral questions unanswered.

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

Completeness2/5

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

Given the complexity of a payment creation tool with multiple output formats and no output schema or annotations, the description is incomplete. It fails to resolve the ambiguity of 'payment request, invoice, or QR code' (mutually exclusive? selected how?) or describe the response structure.

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?

The input schema has 100% description coverage, documenting all seven parameters including units (cents) and formats (ISO 4217). The description adds no specific parameter guidance beyond what the schema already provides, meeting the baseline expectation for well-documented schemas.

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?

The description clearly identifies the action ('Create') and the resources ('payment request, invoice, or QR code'), which distinguishes it from siblings like 'refund' or 'pay'. However, it does not explicitly clarify the relationship between these three distinct outputs or when to expect each one.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'pay' (which likely sends funds) or when to prefer specific output types. There are no stated prerequisites, conditions, or exclusions for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vrllrv/junto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server