Skip to main content
Glama

excalibur_restore_credits

Credit a patron's ledger from a BTCPay-settled invoice.

RESTRICTED to the operator — the operator owns the books and is the only party who can issue a manual credit grant. Patrons who believe they paid but never got credits must escalate to the operator's support, who then invokes this tool on their behalf.

Use cases: cold-start vault races during check_payment, ncred delivery hiccups, patrons closing Top-Off sheets before settle, any infrastructure incident that left an invoice settled at BTCPay but uncredited on the operator's ledger.

Idempotent — if the invoice is already credited (in the patron's credited_invoices), returns success with credits_granted=0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpop_tokenYesA kind-27235 Nostr event signed by the OPERATOR's nsec for this tool. Patron proofs are rejected.
invoice_idYesThe BTCPay invoice ID to verify and credit.
patron_npubYesThe patron's npub whose ledger receives the grant.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It discloses the operator-only access restriction, idempotency (returns credits_granted=0 if already credited), and the context of BTCPay-settled invoices. This gives the agent a clear safety and idempotency profile beyond the basic write operation.

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 well-structured with a bold opening sentence, operator restriction callout, bullet-style use cases, and a concise idempotency note. Every sentence adds value, and the length is appropriate for the tool's sensitivity and complexity.

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?

For an operator-restricted credit tool with an output schema, the description covers purpose, authorization requirements, use cases, and repeat-safety. It omits failure modes, but the output schema and clear operator role make this complete enough for an agent to select and invoke correctly.

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%, with detailed descriptions for all three parameters (dpop_token requires an operator-signed Nostr event, invoice_id is the BTCPay invoice, patron_npub is the recipient). The tool description adds no additional parameter-level meaning, so the baseline 3 is appropriate.

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 starts with 'Credit a patron's ledger from a BTCPay-settled invoice,' which uses a specific verb and clearly identifies the resource and source. It distinguishes itself from sibling tools like excalibur_check_payment and excalibur_purchase_credits by focusing on manual restoration of credits.

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 explicitly states the tool is RESTRICTED to the operator and provides clear escalation guidance for patrons. It lists concrete use cases (cold-start vault races, ncred delivery hiccups, early Top-Off sheet closure) that tell an agent exactly when to invoke this tool versus alternatives.

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.

TDQS

A3.6/5.0
Disambiguation5/5

Each tool targets a distinct operation and domain (account, posts, coupons, credentials, scheduling, oracle, etc.), with clear differentiation even for similar-sounding tools like check_balance vs check_authority_balance or list_coupons vs list_my_coupons. There is no ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern (e.g., create_post, delete_coupon, list_posts), with no mixing of styles. The excalibur_ prefix is uniform.

Tool Count1/5

With 72 tools, the server far exceeds the typical well-scoped range (3–15). While the functionality is broad, the sheer number feels excessive for a single MCP server, leading to an extreme mismatch.

Completeness5/5

The tool surface covers the full lifecycle for core domains: CRUD for posts, snippets, coupons, credentials; complete flows for OAuth, npub proof, scheduling, notarization, and payments. No obvious gaps are present.