Skip to main content
Glama

Invoice Number Gap and Duplicate Check

invoice_number_sequence
Read-onlyIdempotent

Check a run of invoice numbers for gaps and duplicates. Send the invoice numbers (up to 200, for example INV-0001, INV-0002, INV-0004) and the prefix in front of the counter (for example INV-; leave out when the numbers are digits only). Optionally the first and last counter you expect, to catch numbers missing at either end. Get back the missing numbers by range (first, last, how many), every counter used more than once with the forms seen, and any number that does not fit the prefix-plus-counter form. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/invoice-number-sequence). Labels are your own text: emails, web addresses and long digit runs are refused. Not legal, tax or financial advice.

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": {
      "numbers": "<numbers>"
    },
    "name": "invoice_number_sequence"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNoOptional label for the series (your own text, echoed back; not a person).
prefixNoText in front of the counter, for example INV- or 2026/ (matched without regard to case). Leave out for digits-only numbers.
numbersYesThe invoice numbers to check (up to 200; any order).
expected_lastNoOptional: the last counter the series should reach.
expected_firstNoOptional: the first counter the series should start at (for example 1).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover safety (read-only, idempotent, non-destructive, closed-world), and the description adds material context beyond them: no model, no network, nothing stored, hourly rate limit and an explicit error taxonomy, signed answers with a verification URL, and an input restriction that emails/URLs/long digit runs are refused. That is exactly the kind of operational detail an agent needs before calling.

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?

Front-loaded with the purpose and the input instructions before the return shape, which is the right ordering. It is somewhat dense — the bare list of answer fields (ok, verdict, result, rule, does_not, sources, observation, signature, verify) is stacked without explanation, and some clauses run long — but no sentence is truly wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on responsibility for the return shape and does so by naming the answer fields and stating the three result classes (missing ranges, repeated counters, malformed numbers). Combined with the error and privacy disclosure, an agent has enough to call it and interpret the response without further documentation.

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 100%, so the baseline is 3, but the description adds rationale the schema lacks — notably that expected_first/expected_last exist specifically 'to catch numbers missing at either end', and that prefix is matched case-insensitively and should be omitted for digit-only series. The label parameter is only indirectly covered by the sentence about labels being the caller's own text.

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?

Opens with a specific verb and resource: 'Check a run of invoice numbers for gaps and duplicates.' It then enumerates the exact checks performed (interior gaps, boundary gaps via expected first/last, duplicates, and numbers that don't fit prefix-plus-counter), which makes it clearly distinguishable from a plain duplicate check without relying on sibling names.

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?

It gives clear operating context: send the numbers (up to 200) plus the prefix, omit prefix for digits-only series, and optionally supply expected first/last counters to catch edge gaps. What's missing is explicit routing guidance — nothing says when to prefer this over a duplicates-only check or when the tool is inappropriate (e.g., non-sequential numbering schemes).

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