Skip to main content
Glama

Find a customer or invoice

search_credit_control_cases
Read-onlyIdempotent

Search cases already held in the signed-in SHVL workspace by customer name or invoice reference. Read-only, account-scoped and capped at 20 results. Results are paged. applied_filters echoes validated predicates and calculation date. Use next_cursor with the same filters until has_more is false; total_count counts all filtered matches. Data changes invalidate continuation. Amount filters require currency; case/contact dates use oldest positive overdue date in the selected currency when supplied and amounts use the selected currency overdue subtotal. Returned summaries retain all currencies. Detail filters apply to invoice history, not case metadata.

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": {
      "workspace_id": "<workspace_id>"
    },
    "name": "search_credit_control_cases"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum cases to return. Defaults to 10.
queryNoOptional customer-name or invoice-reference search.
cursorNonext_cursor from the preceding page. Repeat the same filters; changed data requires restarting.
due_toNo
statusNoOptional case-workflow status to filter; omit to search across statuses.
currencyNoISO currency. Required with amount bounds; no currency conversion.
due_fromNoInclusive due date; cases use oldest overdue invoice date.
as_of_dateNoUTC date for days-overdue filters. Defaults to today and is fixed across continuation pages.
promise_toNo
case_statusNoExact case-workflow status, including for invoice searches.
customer_idNoExact SHVL customer ID.
promise_fromNoInclusive recorded payment-promise date; excludes cases without a promise.
workspace_idYesSelected business ID from list_shvl_workspaces. Ask the user to choose if several businesses are available; never infer another business.
exclude_statusesNoStatuses to exclude. Invoice searches use invoice status; cases and contacts use case status.
max_amount_minorNoInclusive outstanding amount maximum in the selected currency.
max_days_overdueNo
min_amount_minorNoInclusive outstanding amount minimum in the selected currency; cases use overdue balance.
min_days_overdueNo
readiness_statusNoExact payment-readiness state of the associated case.
exclude_case_statusesNoExclude these case-workflow statuses, including when searching invoices.

Output Schema

NameRequiredDescriptionDefault
casesYes
sourceYes
filtersYes
has_moreYes
as_of_dateYes
case_countYes
data_noticeYes
next_cursorYes
total_countYesAll matches after filters, before paging.
organisationYes
returned_countYes
applied_filtersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed23 schema fields changed
    • addedInput schema / properties / as_of_date
      Added value: +{
      +  "description": "UTC date for days-overdue filters. Defaults to today and is fixed across continuation pages.",
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / case_status
      Added value: +{
      +  "description": "Exact case-workflow status, including for invoice searches.",
      +  "enum": [
      +    "active",
      +    "paused",
      +    "promised",
      +    "disputed",
      +    "closed"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "ISO currency. Required with amount bounds; no currency conversion.",
      +  "pattern": "^[A-Z]{3}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "next_cursor from the preceding page. Repeat the same filters; changed data requires restarting.",
      +  "maxLength": 2048,
      +  "type": "string"
      +}
    • addedInput schema / properties / customer_id
      Added value: +{
      +  "description": "Exact SHVL customer ID.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / due_from
      Added value: +{
      +  "description": "Inclusive due date; cases use oldest overdue invoice date.",
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / due_to
      Added value: +{
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / exclude_case_statuses
      Added value: +{
      +  "description": "Exclude these case-workflow statuses, including when searching invoices.",
      +  "items": {
      +    "enum": [
      +      "active",
      +      "paused",
      +      "promised",
      +      "disputed",
      +      "closed"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 5,
      +  "type": "array",
      +  "uniqueItems": true
      +}
    • addedInput schema / properties / exclude_statuses
      Added value: +{
      +  "description": "Statuses to exclude. Invoice searches use invoice status; cases and contacts use case status.",
      +  "items": {
      +    "enum": [
      +      "active",
      +      "paused",
      +      "promised",
      +      "disputed",
      +      "closed"
      +    ],
      +    "type": "string"
      +  },
      +  "maxItems": 10,
      +  "type": "array",
      +  "uniqueItems": true
      +}
    • addedInput schema / properties / max_amount_minor
      Added value: +{
      +  "description": "Inclusive outstanding amount maximum in the selected currency.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / max_days_overdue
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / min_amount_minor
      Added value: +{
      +  "description": "Inclusive outstanding amount minimum in the selected currency; cases use overdue balance.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / min_days_overdue
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / promise_from
      Added value: +{
      +  "description": "Inclusive recorded payment-promise date; excludes cases without a promise.",
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / promise_to
      Added value: +{
      +  "format": "date",
      +  "type": "string"
      +}
    • addedInput schema / properties / readiness_status
      Added value: +{
      +  "description": "Exact payment-readiness state of the associated case.",
      +  "enum": [
      +    "unchecked",
      +    "ready",
      +    "missing_reference",
      +    "missing_evidence",
      +    "portal_not_submitted",
      +    "receipt_unconfirmed",
      +    "waiting_approval",
      +    "wrong_contact",
      +    "query_open"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / applied_filters
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "as_of_date": {
      +      "description": "UTC date for days-overdue filters. Defaults to today and is fixed across continuation pages.",
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "case_status": {
      +      "description": "Exact case-workflow status, including for invoice searches.",
      +      "enum": [
      +        "active",
      +        "paused",
      +        "promised",
      +        "disputed",
      +        "closed"
      +      ],
      +      "type": "string"
      +    },
      +    "currency": {
      +      "description": "ISO currency. Required with amount bounds; no currency conversion.",
      +      "pattern": "^[A-Z]{3}$",
      +      "type": "string"
      +    },
      +    "customer_id": {
      +      "description": "Exact SHVL customer ID.",
      +      "maxLength": 120,
      +      "type": "string"
      +    },
      +    "due_from": {
      +      "description": "Inclusive due date; cases use oldest overdue invoice date.",
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "due_to": {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "exclude_case_statuses": {
      +      "description": "Exclude these case-workflow statuses, including when searching invoices.",
      +      "items": {
      +        "enum": [
      +          "active",
      +          "paused",
      +          "promised",
      +          "disputed",
      +          "closed"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 5,
      +      "type": "array",
      +      "uniqueItems": true
      +    },
      +    "exclude_statuses": {
      +      "description": "Statuses to exclude. Invoice searches use invoice status; cases and contacts use case status.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array",
      +      "uniqueItems": true
      +    },
      +    "max_amount_minor": {
      +      "description": "Inclusive outstanding amount maximum in the selected currency.",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "max_days_overdue": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "min_amount_minor": {
      +      "description": "Inclusive outstanding amount minimum in the selected currency; cases use overdue balance.",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "min_days_overdue": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "promise_from": {
      +      "description": "Inclusive recorded payment-promise date; excludes cases without a promise.",
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "promise_to": {
      +      "format": "date",
      +      "type": "string"
      +    },
      +    "readiness_status": {
      +      "description": "Exact payment-readiness state of the associated case.",
      +      "enum": [
      +        "unchecked",
      +        "ready",
      +        "missing_reference",
      +        "missing_evidence",
      +        "portal_not_submitted",
      +        "receipt_unconfirmed",
      +        "waiting_approval",
      +        "wrong_contact",
      +        "query_open"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / as_of_date
      Added value: +{
      +  "format": "date",
      +  "type": "string"
      +}
    • addedOutput schema / properties / has_more
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / next_cursor
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / returned_count
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / total_count
      Added value: +{
      +  "description": "All matches after filters, before paging.",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "data_notice",
      -  "organisation",
      -  "source",
      -  "filters",
      -  "case_count",
      -  "cases"
      -]New value: +[
      +  "data_notice",
      +  "organisation",
      +  "source",
      +  "filters",
      +  "case_count",
      +  "cases",
      +  "applied_filters",
      +  "total_count",
      +  "returned_count",
      +  "has_more",
      +  "next_cursor",
      +  "as_of_date"
      +]
  2. Changed4 schema fields changed
    • addedOutput schema / properties / cases / items / properties / currency
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / cases / items / properties / currency_totals
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount_minor": {
      +        "type": "integer"
      +      },
      +      "currency": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "amount_minor"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / cases / items / properties / overdue_total_minor / description
      Added value: +"Null for multiple currencies; use currency_totals without conversion."
    • changedOutput schema / properties / cases / items / properties / overdue_total_minor / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
  3. Changed3 schema fields changed
    • addedInput schema / properties / status / description
      Added value: +"Optional case-workflow status to filter; omit to search across statuses."
    • changedInput schema / properties / workspace_id / description
      Previous value: -"Exact workspace_id returned by list_shvl_workspaces and selected by the user. Never infer a different client workspace."New value: +"Selected business ID from list_shvl_workspaces. Ask the user to choose if several businesses are available; never infer another business."
    • addedOutput schema / description
      Added value: +"filters echoes the applied query and status; case_count counts returned cases. cases contains SHVL case IDs, customer names, invoice summaries and readiness. source gives completed-sync provenance; amounts ending in _minor are currency minor units. A limited result is not an exhaustive customer list."
  4. Changed2 schema fields changed
    • addedInput schema / properties / workspace_id
      Added value: +{
      +  "description": "Exact workspace_id returned by list_shvl_workspaces and selected by the user. Never infer a different client workspace.",
      +  "maxLength": 120,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "workspace_id"
      +]
  5. First observed

TDQS

A4/5.0
Behavior5/5

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

Beyond the read-only annotations, the description discloses account scoping, a 20-result cap, paging with next_cursor/has_more, continuation invalidation when data changes, currency requirements for amount filters, date semantics for overdue calculations, and that returned summaries retain all currencies. It also clarifies that detail filters apply to invoice history rather than case metadata, which is valuable behavioral context.

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?

The description is dense but front-loads the core purpose and constraints before moving into paging and filter semantics. Most sentences carry useful information, though the single-paragraph format and compressed date/currency rules make it somewhat harder to scan than it could be.

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 20-parameter search tool with an output schema and annotations, the description covers the critical behavioral quirks: paging, continuation invalidation, currency handling, date semantics, and invoice-history versus case-metadata filters. It is reasonably complete, though it could better explain when to choose this search over sibling retrieval tools.

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 description coverage is high at 80%, so the schema already does most parameter documentation. The description adds meaningful meaning about currency requirements, oldest positive overdue date usage, selected-currency overdue subtotal, and detail filters applying to invoice history, which helps interpret the filters beyond the schema alone.

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?

The description explicitly states that this searches cases in the signed-in SHVL workspace by customer name or invoice reference, which is a specific verb and resource. It does not explicitly distinguish itself from siblings such as get_credit_control_case or search_xero_invoices, and the title 'Find a customer or invoice' is slightly less precise than the description.

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 clear context for searching cases and explains paging behavior, but it does not state when to use this tool versus alternatives such as get_credit_control_case or search_xero_invoices. Usage is implied rather than explicitly guided, and no exclusions or alternatives are named.

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