Skip to main content
These tools read your subscription, your usage, your credit history and your referral credits. They need the permission billing:read, which you grant on the Authorize access page when you connect. This page is generated from the connector’s tool catalogue. It describes 5 tools. Every tool reads or writes only your own account.

Permissions this page needs

  • billing:read: Read your subscription, usage, and referral information
The permissions reference lists every permission you can grant.

billing.subscription.get

Your agent host shows this tool as “Get subscription”. Read the authenticated student’s sanitized subscription, bonus/referral credits and prepaid pack balance. Permissions: This tool needs billing:read, which the Authorize access page describes as “Read your subscription, usage, and referral information”. Risk: read. This tool only reads your own data. It never changes anything and it never asks for your approval.

Input

Example call

billing.subscription.get input

Result

A result is never larger than 16,384 bytes. If the stored value does not fit, the tool returns a measured fragment and a cursor for the next one. This tool’s result takes one of these 2 forms, and one call returns exactly one of them. The field named beside each form below says which one you are looking at. Open a form to read its top-level fields.
Top-level fields
Top-level fields

Errors

A failed call returns one protocol error with no error code, and its text is Tool call failed. every time. This tool looks up no record by id, so it never sends a text that names a record. The error codes page gives every text a read failure can carry.

billing.usage.get

Your agent host shows this tool as “Get usage”. Read the authenticated student’s current stored usage without creating a period. Permissions: This tool needs billing:read, which the Authorize access page describes as “Read your subscription, usage, and referral information”. Risk: read. This tool only reads your own data. It never changes anything and it never asks for your approval.

Input

Example call

billing.usage.get input

Result

A result is never larger than 16,384 bytes. If the stored value does not fit, the tool returns a measured fragment and a cursor for the next one. This tool’s result takes one of these 2 forms, and one call returns exactly one of them. The field named beside each form below says which one you are looking at. Open a form to read its top-level fields.
Top-level fields
Top-level fields

Errors

A failed call returns one protocol error with no error code, and its text is Tool call failed. every time. This tool looks up no record by id, so it never sends a text that names a record. The error codes page gives every text a read failure can carry.

billing.credit_history.list

Your agent host shows this tool as “List credit history”. List the authenticated student’s credit transactions with measured pagination. Permissions: This tool needs billing:read, which the Authorize access page describes as “Read your subscription, usage, and referral information”. Risk: read. This tool only reads your own data. It never changes anything and it never asks for your approval.

Input

Example call

billing.credit_history.list input

Result

A result is never larger than 16,384 bytes. If the stored value does not fit, the tool returns a measured fragment and a cursor for the next one. This tool’s result takes one of these 2 forms, and one call returns exactly one of them. The field named beside each form below says which one you are looking at. Open a form to read its top-level fields.
Top-level fields
Top-level fields

Errors

A failed call returns one protocol error with no error code, and its text is Tool call failed. every time. This tool looks up no record by id, so it never sends a text that names a record. The error codes page gives every text a read failure can carry.

billing.referrals.get

Your agent host shows this tool as “Get referrals”. Read the authenticated student’s referral code, credits, and invited count. Permissions: This tool needs billing:read, which the Authorize access page describes as “Read your subscription, usage, and referral information”. Risk: read. This tool only reads your own data. It never changes anything and it never asks for your approval.

Input

Example call

billing.referrals.get input

Result

A result is never larger than 16,384 bytes. If the stored value does not fit, the tool returns a measured fragment and a cursor for the next one. This tool’s result takes one of these 2 forms, and one call returns exactly one of them. The field named beside each form below says which one you are looking at. Open a form to read its top-level fields.
Top-level fields
Top-level fields

Errors

A failed call returns one protocol error with no error code, and its text is Tool call failed. every time. This tool looks up no record by id, so it never sends a text that names a record. The error codes page gives every text a read failure can carry.

billing.limits.get

Your agent host shows this tool as “Get plan limits”. Read the authenticated student’s plan tier, entitlement source, billing period and allowances, without creating a usage period. Permissions: This tool needs billing:read, which the Authorize access page describes as “Read your subscription, usage, and referral information”. Risk: read. This tool only reads your own data. It never changes anything and it never asks for your approval.

Input

Example call

billing.limits.get input

Result

A result is never larger than 16,384 bytes. If the stored value does not fit, the tool returns a measured fragment and a cursor for the next one. This tool’s result takes one of these 2 forms, and one call returns exactly one of them. The field named beside each form below says which one you are looking at. Open a form to read its top-level fields.
Top-level fields
Top-level fields

Errors

A failed call returns one protocol error with no error code, and its text is Tool call failed. every time. This tool looks up no record by id, so it never sends a text that names a record. The error codes page gives every text a read failure can carry.