Skip to main content
Glama

retainer

Apply a deposit to an invoice

deposit_apply

Apply part of a held deposit to one invoice: it records that amount as a PAYMENT through the invoice server. amount_minor defaults to the lesser of held and owed. More than either, or a pre-arrival date, is refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDeposit id such as DEP-2026-0001, or an exact client name
dateNoYYYY-MM-DD, the day the deposit was set against the invoice. Defaults to today
noteNoFree text kept on the application row
invoiceYesThe invoice number to apply it to, e.g. INV-2026-0001
amount_minorNoHow much of the deposit to apply, in minor units. Defaults to the smaller of what is held and what the invoice still owes

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?

Annotations declare a mutating (readOnlyHint=false), non-idempotent operation, and the description adds what gets created ('a PAYMENT through the invoice server') and two rejection conditions (over-application, pre-arrival dates). This goes beyond the boolean hints without contradicting them.

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 sentences around 45 words: purpose and effect first, then default behavior, then failure conditions. Every sentence carries distinct information, and nothing merely echoes 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?

All 5 parameters are documented in the schema and the behavioral contract — effect, defaults, and preconditions — is stated. The main gap is that with no output schema, the description could say what the call returns on success, but this does not seriously impede correct invocation.

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 the baseline is 3. The description adds one schema-missing constraint — the pre-arrival date refusal for the date parameter — but restates amount_minor's default that the schema already documents. It complements the schema without meaningfully extending it.

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 ('Apply'), resource ('a held deposit to one invoice'), and the downstream effect ('records that amount as a PAYMENT'). This distinguishes it from sibling operations like deposit_record (recording money in) and deposit_refund (returning held money), and 'part of' clarifies it handles partial application.

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?

The first clause conveys the exact scenario for use: applying part of a held deposit to a single invoice. The refusal conditions ('More than either, or a pre-arrival date, is refused') delimit invalid uses. However, it never names sibling tools or states when to prefer deposit_refund or deposit_record, so it stops short of explicit alternative routing.

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.