Skip to main content
Glama

Use a supplier credit

purchasing_use_credit

Put a credit with a supplier (a prepayment or an overpayment) on one of their open bills, like Xero's allocate credit: bill_id, and amount (default all it can: what is left on the credit or the bill, the smaller); the bill records it as a payment with method credit, and its share of the credit's VAT comes back off. Or refund: true records what is left (or amount) coming back from the supplier, with date and method; or void: true takes back a prepayment recorded by mistake while none of it is used. Same supplier and currency only. Costs $0.01 per call; nothing if it fails.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "credit": "<credit>"
    },
    "name": "purchasing_use_credit"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD
voidNo
amountNo
creditYesThe credit's number, like "SC-0001" (purchasing_list_credits).
methodNobank_transfer
refundNo
bill_idNoThe bill_id purchasing_create_bill returned.
referenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing real side effects: the bill records a payment with method 'credit', the credit's share of VAT is reversed, and refunds need a date and method. It also discloses a per-call cost of $0.01 (nothing on failure), which is high-value operational context for a non-idempotent mutation.

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?

Everything in it earns its place, but it is delivered as a single semicolon-chained run-on sentence, making the three modes harder to scan than labeled alternatives would be. Front-loading of the main action is good; internal structure is not.

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 an 8-parameter mutation with no output schema and only partial schema coverage, it covers the essential preconditions (same supplier and currency), the default amount resolution rule, mode semantics, side effects, and cost. Return shape is unaddressed but is arguably inferable from the side-effect description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 38%, so the description has to compensate, and it does for the important ones: bill_id's role, amount's default-to-maximum behavior and its cap at the smaller of credit/bill, and the boolean mode flags. Only 'reference' and the method enum values are left unexplained.

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+resource ('put a credit with a supplier ... on one of their open bills') and enumerates the three modes (allocate, refund, void) with what each does. The 'with a supplier' framing distinguishes it from the sales-side invoices_use_credit sibling without ambiguity.

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?

Gives explicit per-mode selection guidance: default allocation applies 'all it can', refund:true records money coming back from the supplier, void:true is for a prepayment recorded by mistake 'while none of it is used'. It doesn't name a competing sibling to avoid, so it falls just short of a 5.

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