Skip to main content
Glama

Apply to invoice

solo_apply_payment

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.

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?

Goes well beyond the annotations by disclosing the two-sided amount bound ('never more than the payment has left, never more than the invoice still owes'), the refusal behavior ('refusals name the numbers'), and the resulting state change ('invoice -> paid when fully settled'). The one gap is the declared idempotentHint=false: nothing warns about re-applying the same payment, which matters for a money-moving mutation.

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?

Three short lines, front-loaded with the action, then constraints, then effects. No filler sentences and no 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 description covers what changes and how validation failures behave, which is the essential missing piece. What remains unstated is the response shape and the double-application hazard, but these are modest gaps given full schema coverage and existing annotations.

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%, and the schema itself already explains the amount default ('omit for the smaller of what is left on each side') and the cents convention. The description adds no parameter-level meaning beyond that, 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?

States a specific verb and resource: 'Settle an invoice (or part of it) with a recorded payment.' The phrase 'with a recorded payment' implicitly separates it from solo_record_payment (which creates the payment), but no sibling is named, so the differentiation must be inferred.

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?

Usage is only implied: an agent can infer this runs after a payment exists and before the invoice is considered closed. There is no explicit 'use this instead of X' routing, no stated prerequisite (payment must exist and be unapplied), and no mention of solo_record_payment or o2c_apply_payment as alternatives.

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.