Skip to main content
Glama

Search synced Xero contacts

search_xero_contacts
Read-onlyIdempotent

Search customer contacts from the signed-in owner’s latest completed SHVL Xero sync by name. Returns SHVL customer IDs, names, invoice counts, open and overdue balances in minor currency units, and whether a contact email is present. Does not return email addresses, postal addresses or Xero IDs. 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_xero_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of matching records to return; omit to use the server default.
queryNoOptional text matched against customer name in the selected business; omit to list synced records.
cursorNonext_cursor from the preceding page. Repeat the same filters; changed data requires restarting.
due_toNo
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
queryYes
sourceYes
contactsYes
has_moreYes
as_of_dateYes
data_noticeYes
next_cursorYes
total_countYesAll matches after filters, before paging.
organisationYes
contact_countYes
returned_countYes
applied_filtersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed31 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 / contacts / items / properties / currency
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / contacts / items / properties / open_balance_minor / description
      Added value: +"Null for multiple open currencies; use open_currency_totals."
    • changedOutput schema / properties / contacts / items / properties / open_balance_minor / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedOutput schema / properties / contacts / items / properties / open_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 / contacts / items / properties / overdue_balance_minor / description
      Added value: +"Null for multiple overdue currencies; use overdue_currency_totals."
    • changedOutput schema / properties / contacts / items / properties / overdue_balance_minor / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedOutput schema / properties / contacts / items / properties / overdue_currency_totals
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount_minor": {
      +        "type": "integer"
      +      },
      +      "currency": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "currency",
      +      "amount_minor"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / contacts / items / required
      Previous value: -[
      -  "customer_id",
      -  "name",
      -  "has_contact_email",
      -  "invoice_count",
      -  "open_invoice_count",
      -  "open_balance_minor",
      -  "overdue_balance_minor",
      -  "oldest_due_at",
      -  "case_status"
      -]New value: +[
      +  "customer_id",
      +  "name",
      +  "has_contact_email",
      +  "invoice_count",
      +  "open_invoice_count",
      +  "open_balance_minor",
      +  "overdue_balance_minor",
      +  "oldest_due_at",
      +  "case_status",
      +  "currency",
      +  "open_currency_totals",
      +  "overdue_currency_totals"
      +]
    • 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",
      -  "query",
      -  "contact_count",
      -  "contacts"
      -]New value: +[
      +  "data_notice",
      +  "organisation",
      +  "source",
      +  "query",
      +  "contact_count",
      +  "contacts",
      +  "applied_filters",
      +  "total_count",
      +  "returned_count",
      +  "has_more",
      +  "next_cursor",
      +  "as_of_date"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / limit / description
      Added value: +"Number of matching records to return; omit to use the server default."
    • addedInput schema / properties / query / description
      Added value: +"Optional text matched against customer name in the selected business; omit to list synced records."
    • 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: +"contacts contains SHVL customer_id values, names, has_contact_email, invoice counts and open/overdue balances in currency minor units. contact_count counts returned contacts; query echoes the search. source records the completed sync. The email-presence flag does not disclose an address."
  3. Added

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, closed-world and non-destructive behavior, and the description adds substantial context on top: exactly which fields are returned, which are deliberately withheld, that results are paged, that applied_filters echoes validated predicates and the calculation date, that continuation breaks when data changes, and that no currency conversion occurs. These are behavioral constraints the annotations cannot express.

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

Conciseness3/5

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

It is front-loaded well (purpose and return set first, caveats later) and wastes no sentences, but the middle section is a run-on: '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' is hard to parse and partially restates the currency field description. Unexplained domain jargon ('SHVL') also costs clarity.

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 19-parameter tool with an output schema, the description covers the important ground: result contents and exclusions, pagination lifecycle, filter interaction rules, and as_of_date stability across pages. Remaining gaps are the lack of routing guidance versus sibling search tools and no mention of failure or empty-result behavior.

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?

With 79% schema description coverage the schema does most of the per-field work, but the description adds cross-parameter semantics the schema cannot carry: amount filters require currency, overdue dates resolve to the oldest positive overdue date in the selected currency while summaries retain all currencies, and detail filters apply to invoice history rather than case metadata. The prose is dense but genuinely additive.

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 names a specific verb (search) and resource (customer contacts) plus a precise scope: the signed-in owner's latest completed SHVL Xero sync, matched by name. It also carves out what the results do NOT include (email addresses, postal addresses, Xero IDs), which implicitly separates it from detail tools like get_xero_contact, but no sibling is named 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?

Usage context is clear for one axis only: pagination ('Use next_cursor with the same filters until has_more is false; total_count counts all filtered matches. Data changes invalidate continuation'). There is no explicit statement of when to choose this tool over search_xero_invoices or search_credit_control_cases, and the note that detail filters apply to invoice history rather than case metadata is stated but not framed as guidance.

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