Skip to main content
Glama

create_invoice

Generate payment invoices in BTCPay Server to accept cryptocurrency or fiat payments. Specify amount, currency, and optional order details to create checkout links for customers.

Instructions

Create a new BTCPay invoice.

Args: amount: Payment amount as a string (e.g., '0.001' or '10.00'). Precision is preserved because amounts are sent as strings. currency: Currency code (e.g., 'BTC', 'USD', 'EUR'). Default: 'BTC'. order_id: Optional order ID for tracking (stored in metadata). item_desc: Optional item description (stored in metadata).

Returns the invoice ID, status, checkout URL, and expiration time. Use the checkout URL to direct users to the payment page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYes
currencyNoBTC
order_idNo
item_descNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/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 behavioral disclosure. It successfully explains what is returned (invoice ID, status, URL, expiration) and where optional data is stored (metadata). However, it omits safety characteristics, error handling behavior, and idempotency details expected for a financial creation tool.

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?

The docstring-style structure (Args/Returns) is clear and front-loaded with the purpose statement. Every sentence earns its place given the lack of schema documentation. Slightly verbose format is appropriate for the parameter explanations required.

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

Completeness4/5

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

Given the 4-parameter complexity and existence of an output schema, the description adequately covers inputs and return values. Minor gaps remain regarding error states and explicit sibling differentiation, but the core functionality is sufficiently documented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by documenting all four parameters in the Args section. It provides critical semantic details: amount precision behavior (strings preserve precision), format examples ('0.001', '10.00'), currency codes, and the tracking purpose of optional metadata fields.

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 opens with 'Create a new BTCPay invoice,' providing a specific verb and resource. It distinguishes from siblings like create_payment_request and create_pull_payment by specifying 'invoice,' though it does not explicitly contrast use cases between these similar creation tools.

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 post-invocation guidance ('Use the checkout URL to direct users to the payment page') but lacks guidance on when to select this tool versus alternatives like create_payment_request or create_pull_payment. No when-not-to-use or alternative recommendations are provided.

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/ThomsenDrake/btcpay-mcp'

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