Skip to main content
Glama

invoice_search

Read-onlyIdempotent

Finds invoices whose text fields (invoice number, notes, payment terms) contain every word of q. Rows carry the same worked-out money and state as invoice_read: total_cents, remaining_cents, state, is_overdue (integer CENTS), and payer_confirmations_pending. Refuses an empty q with VALIDATION_ERROR: send the invoice number, such as INV-2026-0001, or a word from its notes.

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": {
      "q": "<q>"
    },
    "name": "invoice_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesSearch text (substring match over the entity's text properties; %/_ are literal).
limitNoPage size 1-200. Omit BOTH limit and cursor for the legacy bare-array first page of 200; pass either to get { items, next_cursor, limit } instead.
cursorNoOpaque page cursor — pass a previous response's next_cursor verbatim. null next_cursor means no further pages.

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?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description earns credit by adding behavior the annotations cannot convey: AND semantics across all query words, the explicit VALIDATION_ERROR on empty input with a recovery hint, and the shape of each row. It stops short of saying anything about result ordering or how many rows to expect at scale.

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?

Three tight sentences, each doing distinct work: what matches, what comes back, what fails. The list of returned fields is slightly dense but earns its place because there is no output schema. Nothing is redundant with the title or name.

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?

With no output schema, enumerating total_cents, remaining_cents, state, is_overdue (and flagging that money is in integer CENTS) is exactly the right compensation, and nulling out the empty-q failure mode prevents a predictable error round-trip. Pagination is covered by the schema, so its absence from the description is acceptable; result ordering is the remaining gap.

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 baseline is 3, and the description genuinely adds meaning for q: multiple words are ANDed and are matched across invoice number, notes, and payment terms. That clarifies what the schema's generic 'substring match over the entity's text properties' leaves vague. limit and cursor semantics are left entirely to the schema, which handles them well.

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 (finds) and resource (invoices) plus the exact scope of the match: text fields — invoice number, notes, payment terms — containing every word of q. That is far more precise than a bare 'search invoices'. It does not, however, tell the agent how this differs from invoice_list or myinvois_invoice_search; the only sibling reference is to invoice_read for output shape, not for routing.

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 description gives strong input-side guidance — an empty q is refused with VALIDATION_ERROR and the caller should instead pass an invoice number like INV-2026-0001 or a word from notes. That is a real operational rule. What is missing is when-to-use-this-versus-alternatives: nothing says to prefer invoice_list for status/client filtering or invoice_read once the id is known.

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