Skip to main content
Glama

Check invoice policies

check_invoice_policies
Read-onlyIdempotent

Runs every policy in the invoice's group against the invoice now and returns, per policy, whether it applies, when its action would run, and if it does not apply the reason (for example below the minimum amount, already charged or policy inactive). Explains why an invoice did or did not get a reminder, late fee or other action. Read only: nothing is created or sent.

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": {
      "organisationId": "<organisationId>",
      "id": "<id>"
    },
    "name": "check_invoice_policies"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
organisationIdYesId of the organisation to act on, from list_organisations

Output Schema

NameRequiredDescriptionDefault
policiesYes
groupNameYesThe contact's group, whose policies are checked
invoiceNumberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the closing 'Read only: nothing is created or sent' largely restates them. The description does add genuine behavioral value beyond the annotations by disclosing the evaluation model (all policies in the invoice's group are run now, not historically) and enumerating the per-policy outcomes and non-applicability reasons an agent will receive.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and return shape, then the explanatory purpose and safety note. Dense but every clause carries information; only the read-only sentence duplicates what annotations already say.

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?

An output schema exists, so return values need not be explained, yet the description helpfully previews the per-policy result shape. For a two-parameter read tool this is nearly complete; the only gap is that the id parameter's identity is left to inference.

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 coverage is 50%: organisationId is documented and cross-references list_organisations, while id carries only format/pattern constraints with no description. The description's phrase 'the invoice's group' hints that id is an invoice identifier, but it does not compensate for the undocumented id parameter with any explicit statement.

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 concrete verb+resource: runs all policies for the invoice's group against the invoice and returns per-policy applicability, action timing and non-application reasons. The invoice scope implicitly distinguishes it from the sibling check_contact_policies, though the description never names that sibling or states the contrast explicitly.

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 line 'Explains why an invoice did or did not get a reminder, late fee or other action' implies the diagnostic use case (explaining past or pending policy actions) but gives no explicit trigger, no prerequisites, and no routing away from alternatives like get_invoice or list_actions when the agent only wants the invoice's current state.

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