Skip to main content
Glama

Generate top-up wallet integration

generate_topup_integration_snippet

For EXISTING apps: emits the recommended top-up wallet integration — ledger schema + cumulative-credit webhook handler + atomic invoice-settle function. Credits crypto payments to a user's balance first, then debits invoices from it, so over/under/late/duplicate payments become balance states, not payment exceptions. Pair with the payram-topup-wallet-integration skill. (New store with no users? Use the checkout/plugin path instead.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partNoWhich piece to emit: 'schema' (ledger DDL), 'webhook' (cumulative-credit handler), 'settle' (atomic invoice debit), or 'all'.all
frameworkNoServer framework for the webhook handler + settle function.express

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYes
titleYes
snippetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description takes on the burden. It explains the core behavioral logic (credits first, then debits) and the design outcome (balance states instead of payment exceptions). This goes beyond just saying 'generates code' and helps the agent predict what the tool produces. It doesn't mention output format, but that's covered by the output schema.

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?

The description is about 50 words, front-loaded with the target audience, and every sentence adds value: use case, components, behavioral promise, and alternative path. No fluff or repetition.

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?

Given the tool has 2 parameters, a rich output schema, and an explicit use-case split (existing vs new store), the description covers the key decision points. It names the pieces, explains the integration approach, and points to the alternative for new stores, making it complete for selection and invocation.

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% with clear enum descriptions for both parameters, so the schema does the heavy lifting. The description doesn't add much parameter-specific detail beyond what's already in the schema, but it does contextualize the components ('ledger schema + cumulative-credit webhook handler + atomic invoice-settle function') which maps to the 'part' enum.

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 clearly states the tool emits a top-up wallet integration with specific components (ledger schema, webhook handler, atomic invoice-settle function). It distinguishes itself from sibling snippet tools by scoping to 'EXISTING apps' and contrasting with the checkout/plugin path.

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?

Explicitly says 'For EXISTING apps' and gives an alternative for new stores: 'Use the checkout/plugin path instead'. Also recommends pairing with a skill, giving clear when-to-use and when-not-to-use guidance.

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