For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Operation
REST
Required scopes

billing.invoices.list

GET /billing/invoices

billing:read

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • invoices (array<object>): See the complete response schema below.

Response schema: billing.invoices.list

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

Operation
REST
Required scopes

billing.invoices.get

GET /billing/invoices/{invoiceNumber}

billing:read

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • number (string): Invoice number; what the other invoice operations take

  • period (object): Billing period, inclusive

  • status ("draft" / "finalized" / "paid"): See the complete response schema below.

  • partialMonth (boolean): The organization's billing began during the period

  • currency (string): See the complete response schema below.

  • totalCents (integer): Usage charged in the period

  • amountDueCents (integer): What the organization owes on this invoice; 0 when credit covered it

  • closingBalanceCents (integer): Balance at the end of the period; negative means owed

  • createdOn (string): YYYY-MM-DD

  • updatedOn (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 period

  • items (array<object>): Itemized usage

  • credits (array<object>): Payments, promos, refunds and adjustments within the period

  • finalizedOn (string or null): See the complete response schema below.

  • paidOn (string or null): See the complete response schema below.

Response schema: billing.invoices.get

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

Operation
REST
Required scopes

billing.charges.list

GET /billing/charges

billing:read

Arguments

Argument
Type
Required
Description

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

Complete input schema

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

Response schema: billing.charges.list

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

Operation
REST
Required scopes

billing.credits.list

GET /billing/credits

billing:read

Arguments

Argument
Type
Required
Description

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

Complete input schema

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

Response schema: billing.credits.list

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

Operation
REST
Required scopes

billing.paymentMethods.list

GET /billing/payment-methods

billing:read

Arguments

Argument
Type
Required
Description

org

string

No

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Complete input schema

Result

  • paymentMethods (array<object>): See the complete response schema below.

Response schema: billing.paymentMethods.list

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

Operation
REST
Required scopes

billing.paymentMethods.setDefault

POST /billing/payment-methods/{paymentMethodId}/default

billing:write

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • paymentMethods (array<object>): See the complete response schema below.

Response schema: billing.paymentMethods.setDefault

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

Operation
REST
Required scopes

billing.paymentMethods.remove

DELETE /billing/payment-methods/{paymentMethodId}

billing:write

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • paymentMethods (array<object>): The cards that remain

  • autoReloadDisabled (boolean): Auto-reload was switched off because no card is left

Response schema: billing.paymentMethods.remove

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

Operation
REST
Required scopes

billing.vouchers.redeem

POST /billing/vouchers/redeem

billing:write

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • amountCents (integer): Credit added to the balance

  • redemptionsRemaining (integer or null): Uses the voucher has left

Response schema: billing.vouchers.redeem

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

Operation
REST
Required scopes

billing.nodeProtection.get

GET /billing/node-protection

billing:read

Arguments

Argument
Type
Required
Description

org

string

No

Slug of the organization to act in (see orgs.list); needed when the caller reaches more than one

Complete input schema

Result

  • enabled (boolean): The organization's dedicated servers are hibernated when the balance runs low

  • thresholdHours (integer or null): Hours of runway left (balance over spend rate) at which the servers are hibernated; null when off

  • hibernatedAt (string or null): When protection last hibernated the servers

  • deprovisionedAt (string or null): When a balance past its limit last deprovisioned them

Response schema: billing.nodeProtection.get

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

Operation
REST
Required scopes

billing.nodeProtection.update

PATCH /billing/node-protection

billing:write

Arguments

Argument
Type
Required
Description

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

Complete input schema

Result

  • enabled (boolean): The organization's dedicated servers are hibernated when the balance runs low

  • thresholdHours (integer or null): Hours of runway left (balance over spend rate) at which the servers are hibernated; null when off

  • hibernatedAt (string or null): When protection last hibernated the servers

  • deprovisionedAt (string or null): When a balance past its limit last deprovisioned them

Response schema: billing.nodeProtection.update

Operation-specific errors: 400 org_required, 403 key_project_restricted.

Was this helpful?