Skip to main content
Glama

create_payment

Generate Lightning Network invoices to pay for AI services like image generation, text creation, and video production. Payment is required before accessing the selected AI tool.

Instructions

Create a Lightning invoice payment for using an AI service. Returns a Lightning invoice that must be paid before calling the service tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNameYesThe name of the tool to pay for (e.g., 'generate_image', 'generate_video')
modelIdYesThe AI model database ID to use
quantityNoNumber of outputs/credits (default: 1)
additionalChargeNoAdditional charge in sats (optional)
phoneNumberNoRequired for send_sms and place_call: destination phone in E.164 format (e.g., +14155550100)
messageNoRequired for send_sms: message text (max 120 chars)
durationMinutesNoRequired for place_call with audioUrl: call duration in minutes (1-30). Defaults to 1 for TTS.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: it creates a payment invoice (implying a write/mutation operation) and that payment is required before service use, which is useful context. However, it lacks details on permissions, error handling, rate limits, or what happens if payment fails, leaving gaps for a mutation tool.

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 two sentences, front-loaded with the core purpose and followed by critical behavioral context (payment requirement). Every word earns its place with no redundancy or fluff, making it highly efficient and easy to parse.

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?

Given the complexity (7 parameters, mutation operation) and no annotations or output schema, the description is partially complete. It covers the purpose and usage flow well but lacks details on return values (only mentions 'returns a Lightning invoice' without format), error cases, or security considerations, which are important for a payment tool.

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 the schema fully documents all 7 parameters. The description does not add any parameter-specific meaning beyond what the schema provides, such as explaining dependencies between parameters (e.g., 'phoneNumber' is only for certain 'toolName' values). Baseline is 3 as the schema handles the heavy lifting.

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 specific action ('Create a Lightning invoice payment') and the resource ('for using an AI service'), distinguishing it from siblings like 'check_payment_status' or 'get_model_pricing'. It explicitly mentions the purpose is to generate a payment invoice before calling service tools, which is distinct from direct AI service tools like 'generate_image'.

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?

The description provides explicit guidance on when to use this tool: 'for using an AI service' and 'must be paid before calling the service tool'. It implicitly distinguishes from alternatives by indicating this is a prerequisite payment step, not the service execution itself, though it does not name specific alternative tools for different scenarios.

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/cnghockey/sats4ai'

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