Skip to main content
Glama

Multi Books

Read totals by customer or supplier

reports_totals_by_contact
Read-only

Read a company's sales by customer or purchases by supplier for a period: each contact, by its id and name, with what its invoices - or bills - dated in the period total, and the company's totals: on FreeAgent and Xero VAT included, the biggest first, in each currency apart. FreeAgent's and Xero's APIs total no period by contact, so there this is computed from every invoice or bill dated in the period - drafts and those cancelled or voided left out, credit notes not taken off, save that a FreeAgent bill refund, kept as a negative bill, lowers its supplier's total - and marked computed. On Zoho Books it is Zoho's own Sales by Customer or Purchases by Vendor report, never computed: each contact by its id where Zoho names one, in Zoho's own order and with no company totals, with Zoho's figures before and after tax and its counts - purchases counting bills, expenses, vendor credits and journals, spending that names no supplier standing as Others - in the organisation's base currency, which companies_list names. On QuickBooks it is QuickBooks' own Sales by Customer Summary, or Expenses by Supplier Summary, for the period - its figures before tax, in the company's home currency, a customer's sub-customers and projects in a section under it, the supplier summary counting every expense booked to a supplier, bill or not, and one booked to none in a row with an empty name and no id, never computed: report, from, to, currency, columns - their titles - and rows in QuickBooks' order, each with cells - its values in column order - and id, the QuickBooks record its first cell names, where it names one; a section carries header, its own rows and summary. For one company or several and at most four at once, read live from FreeAgent, Xero, QuickBooks or Zoho Books. A company that could not be read stands under unread with why, as bank_accounts_list answers it. A Zoho Books organisation whose sign-in Zoho refuses its reports stands under unread as zoho_reports, its note saying to add Zoho Books again signed in to Zoho as the same account.

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": {
      "kind": "<kind>",
      "from": "<from>"
    },
    "name": "reports_totals_by_contact"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoThe last day of the period, as 2026-10-31; today where omitted.
fromYesThe first day of the period, as 2026-04-01.
kindYessales for sales by customer, from invoices; purchases for purchases by supplier, from bills. On QuickBooks, purchases come from every expense.
companiesNoThe ids companies_list gives the companies to read; every company where omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior5/5

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

With readOnlyHint already declaring a safe read, the description adds extensive behavior: FreeAgent/Xero figures are computed and marked as such, drafts/cancelled/voided invoices are excluded, credit notes are not netted, and provider-specific handling is spelled out. It also documents unread results and Zoho report-auth refusal, so the agent knows both normal and failure behavior.

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

Conciseness2/5

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

The content is dense and useful, but it is delivered as one long, semicolon-heavy paragraph with nested qualifications, making it hard to scan. Key provider differences could be structured more cleanly, and several clauses are more convoluted than necessary.

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?

Because there is no output schema, the description must carry return-shape information, and it does: per-contact ids/names, company totals, provider-specific columns/rows/sections, currencies, and ordering. It also covers unread companies and Zoho auth failures, leaving little an agent needs before calling it.

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 100%, so the schema already explains from, to, kind, and companies; the description mainly restates the period and sales/purchases meaning. It adds the 'at most four at once' limit for companies and some provider-specific interpretation, but that is a modest increment over the schema.

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 opening states a specific verb ('Read') and resource ('sales by customer or purchases by supplier for a period'), and the rest defines the returned per-contact and company totals. It does not explicitly route the agent away from sibling reports such as reports_sales_by_item or aged reports, so it stops short of full sibling differentiation.

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?

It establishes the operating context—one to four companies, live reads from four named providers—and the sales/purchases split. It never says when to choose this over other report tools or when it is inappropriate, leaving usage largely implied by the returned data.

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.