Skip to main content
Glama

Apply to invoice (invoicing)

solo_apply_payment
Destructive

Settle an invoice (or part of it) with a recorded payment. Bounded on both sides — never more than the payment has left, never more than the invoice still owes; refusals name the numbers. Effects: application recorded; invoice -> paid when fully settled.

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": {
      "payment_id": "<payment_id>",
      "invoice_id": "<invoice_id>"
    },
    "name": "solo_apply_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoHow much to apply. Omit for the smaller of what is left on each side. In cents (integer minor units) — 1250 means $12.50.
invoice_idYesThe invoice it settles.
payment_idYesThe payment, e.g. P-0001.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, the description discloses the core business rule: application is bounded by both the remaining payment balance and the outstanding invoice amount, and refusals report the conflicting numbers. It also states the effects — an application is recorded and the invoice moves to paid when fully settled. It does not address what happens on repeat invocation, which matters given idempotentHint=false.

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

Conciseness5/5

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

Two short sentences plus an effects line, front-loaded with the purpose and followed by the constraint and outcome. Every clause carries information an agent needs; there is no filler or redundant restatement of the title.

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 non-idempotent mutation with no output schema, the definition covers purpose, invariants, refusal behavior, and state transition, which is most of what an agent needs. The remaining gap is repeat-call semantics — whether a second application double-settles — which the annotations flag as relevant but the description leaves unaddressed.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters, including the cents convention and the default-amount behavior, are already documented in the schema. The description reinforces the boundedness semantics that govern the amount but adds no parameter-level detail beyond what the schema provides, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Settle an invoice (or part of it) with a recorded payment.' This makes clear it applies an existing payment rather than creating one, which implicitly separates it from a payment-recording tool. It stops short of naming a sibling or stating the distinguishing condition explicitly, so it is clear but not sibling-differentiated.

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

Usage Guidelines3/5

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

The phrase 'with a recorded payment' implies the payment must already exist before calling, which is a useful precondition. However, there is no explicit when-to-use or when-not-to-use guidance, and no pointer to alternatives such as a dedicated record-payment tool for the case where no payment exists yet.

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.