Invoices and payment settings
Read invoices and ledger history, manage saved cards, redeem vouchers and configure node protection.
Read invoices and ledger history, manage saved cards, redeem vouchers and configure node protection.
These are action names. In default compact mode, call the indicated group tool with {"action":"<action-name>","params":{...}}; the arguments below go inside params. In ?mode=all, call the action name directly with those arguments. browse_github and read_docs are direct tools in both modes. Expand each schema for nested fields, enum values and validation constraints. Successful results are JSON in both text content and structuredContent; failures use isError and structuredContent.error.
list_invoices
List the organization's monthly invoices, newest first. Optionally for one month, status or date range
Group: billing · Behavior: Read
Compact tool: billing · Action: list_invoices
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.invoices.list
GET /billing/invoices
billing:read
Arguments
year
integer
No
Invoices of one year
month
integer
No
Invoices of one month (with year)
status
"draft" / "finalized" / "paid"
No
Invoices in this state
from
string
No
Billing periods starting on or after this day, YYYY-MM-DD
to
string
No
Billing periods ending on or before this day, YYYY-MM-DD
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
invoices(array<object>): See the complete response schema below.
Operation-specific errors: 400 org_required, 403 key_project_restricted.
get_invoice
Get one invoice with its summary, itemized usage, payments and credits. The PDF is only available through the REST API (GET /v1/billing/invoices/{invoiceNumber}/pdf).
Group: billing · Behavior: Read
Compact tool: billing · Action: get_invoice
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.invoices.get
GET /billing/invoices/{invoiceNumber}
billing:read
Arguments
invoiceNumber
string
Yes
Invoice number
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
number(string): Invoice number; what the other invoice operations takeperiod(object): Billing period, inclusivestatus("draft" / "finalized" / "paid"): See the complete response schema below.partialMonth(boolean): The organization's billing began during the periodcurrency(string): See the complete response schema below.totalCents(integer): Usage charged in the periodamountDueCents(integer): What the organization owes on this invoice; 0 when credit covered itclosingBalanceCents(integer): Balance at the end of the period; negative means owedcreatedOn(string): YYYY-MM-DDupdatedOn(string or null): See the complete response schema below.customer(object): See the complete response schema below.statement(object): The statement summary: how the balance moved over the perioditems(array<object>): Itemized usagecredits(array<object>): Payments, promos, refunds and adjustments within the periodfinalizedOn(string or null): See the complete response schema below.paidOn(string or null): See the complete response schema below.
Operation-specific errors: 400 org_required, 403 key_project_restricted.
list_charges
Usage charges summed per day or per hour, newest first. From the ledger, with the split between serverless apps, dedicated servers and spot leases
Group: billing · Behavior: Read
Compact tool: billing · Action: list_charges
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.charges.list
GET /billing/charges
billing:read
Arguments
granularity
"day" / "hour"
No
Sum per day (default) or per hour
from
string
No
First day to include, YYYY-MM-DD
to
string
No
Last day to include, YYYY-MM-DD
timeZone
string
No
IANA time zone the days are counted in, e.g. America/Los_Angeles; UTC by default
limit
integer
No
Items per page, 1 to 200 (default 50)
cursor
string
No
nextCursor from the previous page; omit for the first page
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
charges(array<object>): See the complete response schema below.nextCursor(string or null): Pass as cursor to fetch the next page; null on the last page
Operation-specific errors: 400 org_required, 403 key_project_restricted.
list_credits
Ledger entries that added or removed credit, newest first. Payments, promotional credit, refunds, adjustments
Group: billing · Behavior: Read
Compact tool: billing · Action: list_credits
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.credits.list
GET /billing/credits
billing:read
Arguments
type
"credit_topup" / "manual_payment" / "signup_promo" / "credit_promo" / "social_media_promo" / "refund" / "adjustment"
No
Only entries of this type
from
string
No
First day to include, YYYY-MM-DD (UTC)
to
string
No
Last day to include, YYYY-MM-DD (UTC)
limit
integer
No
Items per page, 1 to 200 (default 50)
cursor
string
No
nextCursor from the previous page; omit for the first page
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
entries(array<object>): See the complete response schema below.nextCursor(string or null): Pass as cursor to fetch the next page; null on the last page
Operation-specific errors: 400 org_required, 403 key_project_restricted.
list_payment_methods
List the organization's saved cards and which one is the default
Group: billing · Behavior: Read
Compact tool: billing · Action: list_payment_methods
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.paymentMethods.list
GET /billing/payment-methods
billing:read
Arguments
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
paymentMethods(array<object>): See the complete response schema below.
Operation-specific errors: 400 org_required, 403 key_project_restricted.
set_default_payment_method
Make a saved card the default for auto-reload and top-ups
Group: billing · Behavior: Write
Compact tool: billing_write · Action: set_default_payment_method
MCP annotations: readOnlyHint: false · destructiveHint: true · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.paymentMethods.setDefault
POST /billing/payment-methods/{paymentMethodId}/default
billing:write
Arguments
paymentMethodId
string
Yes
Payment method id from the list
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
paymentMethods(array<object>): See the complete response schema below.
Operation-specific errors: 404 not_found, 400 org_required, 403 key_project_restricted.
remove_payment_method
Remove a saved card. A removed default is replaced by the next saved card; auto-reload is switched off when no card is left.
Group: billing · Behavior: Write
Compact tool: billing_write · Action: remove_payment_method
MCP annotations: readOnlyHint: false · destructiveHint: true · idempotentHint: false · openWorldHint: false
Requires confirm: true for this irreversible action.
Permissions and REST equivalents
billing.paymentMethods.remove
DELETE /billing/payment-methods/{paymentMethodId}
billing:write
Arguments
paymentMethodId
string
Yes
Payment method id from the list
confirm
true
Yes
Must be true: this action cannot be undone
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
paymentMethods(array<object>): The cards that remainautoReloadDisabled(boolean): Auto-reload was switched off because no card is left
Operation-specific errors: 404 not_found, 400 org_required, 403 key_project_restricted.
redeem_voucher
Redeem a voucher code for organization credit; once per person per code
Group: billing · Behavior: Write
Compact tool: billing_write · Action: redeem_voucher
MCP annotations: readOnlyHint: false · destructiveHint: false · idempotentHint: false · openWorldHint: false
Permissions and REST equivalents
billing.vouchers.redeem
POST /billing/vouchers/redeem
billing:write
Arguments
code
string
Yes
The voucher code
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
amountCents(integer): Credit added to the balanceredemptionsRemaining(integer or null): Uses the voucher has left
Operation-specific errors: 404 voucher_not_found, 400 voucher_rejected, 429 too_many_attempts, 400 org_required, 403 key_project_restricted.
get_node_protection
Read the organization's node protection setting. Whether its dedicated servers are hibernated automatically when the balance is about to run out, and at how many hours of runway
Group: billing · Behavior: Read
Compact tool: billing · Action: get_node_protection
MCP annotations: readOnlyHint: true · destructiveHint: false · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.nodeProtection.get
GET /billing/node-protection
billing:read
Arguments
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
enabled(boolean): The organization's dedicated servers are hibernated when the balance runs lowthresholdHours(integer or null): Hours of runway left (balance over spend rate) at which the servers are hibernated; null when offhibernatedAt(string or null): When protection last hibernated the serversdeprovisionedAt(string or null): When a balance past its limit last deprovisioned them
Operation-specific errors: 400 org_required, 403 key_project_restricted.
set_node_protection
Turn node protection on with a runway threshold, or off. On: when the balance would run out within thresholdHours at the current spend rate, the organization's dedicated servers are hibernated (storage only) until credits are added.
Group: billing · Behavior: Write
Compact tool: billing_write · Action: set_node_protection
MCP annotations: readOnlyHint: false · destructiveHint: true · idempotentHint: true · openWorldHint: false
Permissions and REST equivalents
billing.nodeProtection.update
PATCH /billing/node-protection
billing:write
Arguments
enabled
boolean
Yes
Turn protection on or off
thresholdHours
integer
No
Hours of runway that trigger hibernation, 2 to 48; required when enabling
org
string
No
Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one
Result
enabled(boolean): The organization's dedicated servers are hibernated when the balance runs lowthresholdHours(integer or null): Hours of runway left (balance over spend rate) at which the servers are hibernated; null when offhibernatedAt(string or null): When protection last hibernated the serversdeprovisionedAt(string or null): When a balance past its limit last deprovisioned them
Operation-specific errors: 400 org_required, 403 key_project_restricted.
Was this helpful?
