Skip to main content
Glama

Record what a stack or account actually cost

record_bills
Idempotent

Record what the user actually paid each service in a month, on one of their saved stacks or audits, and compare it with the estimate at the users it was saved with. Without id, the bills are kept on the account, not on a stack (for someone who has not saved one): they are recorded and listed, with no estimate to compare, and can be moved onto a stack later on the Billing page. Pass bills (month as YYYY-MM, the service as vendor_id or name as on the invoice, amount_usd), or csv: a billing export with columns for month or date, service or vendor, and amount, or invoice_text: an invoice's text as pasted from the PDF or email (the service, month and total are read from it, each with the invoice line it came from; preview: true reads it without saving, so the user can check it first). A bill replaces any earlier one for the same service and month; remove deletes a month (or one service in it). Returns, per service, the estimate, the bill and the difference, flagging bills more than 20% (and $5) over or under. With alerts on, a bill well over its estimate is emailed too. Needs sign-in. How to present: a table of service, estimate, billed and difference; then say what could explain the biggest gap (more users or usage than given, a plan above the one assumed, add-ons the catalogue does not price) and offer update_saved_stack with the real user count.

Input Schema

NameRequiredDescriptionDefault
idNoThe saved stack or audit. Leave out to keep the bills on the account.
csvNoA CSV billing export: a header row, then one row per charge.
billsNo
monthNoWhich month to compare. Default: the newest with bills.
removeNo
previewNoWith invoice_text: read it and show what was found, without saving.
invoice_textNoOne invoice's text, copied from the PDF or the email.

Output Schema

NameRequiredDescriptionDefault
dataYesThe tool result. Its shape depends on the tool.
staleYes
caveatsYesShow to the user word for word.
sourcesYes
confidenceYes
assumptionsYesUsage and pricing assumptions behind the numbers.
disclosuresYesAlways includes the neutrality note: no vendor pays for a place in the answer. Link its url when you mention how Kong Reviews is paid.
generated_atYes
engine_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / disclosures / description
      Added value: +"Always includes the neutrality note: no vendor pays for a place in the answer. Link its url when you mention how Kong Reviews is paid."
  2. Changed2 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"The saved stack or audit. Leave out to keep the bills on the account."
    • removedInput schema / required
      Removed value: -[
      -  "id"
      -]
  3. Changed2 schema fields changed
    • addedInput schema / properties / invoice_text
      Added value: +{
      +  "description": "One invoice's text, copied from the PDF or the email.",
      +  "maxLength": 60000,
      +  "type": "string"
      +}
    • addedInput schema / properties / preview
      Added value: +{
      +  "description": "With invoice_text: read it and show what was found, without saving.",
      +  "type": "boolean"
      +}
  4. Added

TDQS

A4.5/5.0
Behavior5/5

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

With readOnlyHint=false already set, the description still adds substantial disclosure: sign-in requirement, that a new bill replaces the earlier one for the same service/month (idempotent, matching idempotentHint), that remove deletes a month or a single service, that alerts can trigger an outbound email, and that a >20%/$5 gap gets flagged. Note the mild tension with destructiveHint=false given 'remove deletes a month', but this is record-level cleanup of bill entries rather than account data loss, so it does not read as a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is dense and mostly earns its place, but it arrives as one long run-on paragraph with stacked parentheticals, so key facts (mode selection, replacement semantics, return shape) are hard to scan. The trailing 'How to present' instruction is useful but adds further bulk without any structural separation.

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?

For a 7-parameter, nested-object, multi-modal tool with an output schema, this covers auth, write semantics, side effects and mode selection thoroughly. Return values are re-described despite an output schema existing, which is redundant rather than harmful; the remaining gap is error/partial-failure behaviour for CSV or invoice parsing.

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?

Goes well past the 71% schema coverage: it specifies the bills item shape (month as YYYY-MM, vendor_id or invoice name, amount_usd), what columns the csv must contain, that invoice_text is pasted PDF/email text from which service/month/total are extracted, and that preview only reads without saving. It also clarifies the id-absent behaviour and the month default, which the schema only partially carries.

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?

States a specific verb and resource ('Record what the user actually paid each service in a month, on one of their saved stacks or audits') and the downstream comparison against the estimate. An agent can distinguish this from estimate_cost, plan_stack or project_stack without opening the schema, since this is the only one that ingests actual invoices/bills.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly routes the three input modes (bills, csv, invoice_text) and the id-less variant ('the bills are kept on the account, not on a stack'), plus the preview/remove sub-modes. It also tells the agent to offer update_saved_stack afterwards when the real user count differs. It never explicitly says when NOT to use it (e.g. use estimate_cost for hypotheticals), but the context is unambiguous.

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.

Resources