Skip to main content
Glama

Audit many expense statements at once

audit_expense_portfolio
Read-onlyIdempotent

Audit many landlord operating-expense (CAM) statements at once, for a tenant with many locations or for a lease audit firm or tenant-rep broker acting for one. Takes up to 50 audits, each the input audit_expense_statement takes (the lease's verified facts, the statement's verified facts, optionally the prior year's lines) plus a label and optionally the landlord, and one as_of date for all. Runs audit_expense_statement on each location (the same function, not a second implementation). Returns, per location, the audit's summary (findings by class, dollars at stake by class, the dispute deadline, the checks that could not run), its findings in short form with lease and statement pages, a reference to its full result (digests of its input and result; include_results returns the whole result) and its own package_items for fact_package_send; across the portfolio, totals by finding class and by check, dollars at stake in total and by landlord, the locations ranked by dollars at stake, dispute deadlines in date order with days remaining counted from as_of, repeated issues (the same check failing at several locations, or in several statement years for one landlord) and the locations whose input failed validation, each with its issues (the other locations are still audited). Deterministic and no model: same inputs, same answer, no clock. Findings are differences against quoted terms, not legal conclusions. On the hosted API the answer carries, for each location, its own attestation (the one audit_expense_statement returns for that location's input), so each location's package is sent to its own landlord and checked on its own through fact_package_send; a service without a signing key returns none and says so. On the hosted API, callers without a Pro or Team key get the summary only (counts and totals); the one free full document of an email-verified account covers a single audit (audit_expense_statement), not a portfolio, and the answer says so. Metering: the portfolio report (report_create kind expense_audit_portfolio) counts one unit of the monthly report allowance for each location audited in full (report_units); this tool call is not counted, as audit_expense_statement is not.

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": {
      "audits": "<audits>",
      "as_of": "<as_of>"
    },
    "name": "audit_expense_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_ofYesToday's date, YYYY-MM-DD, for every location. The tool reads no clock: every deadline's days remaining is counted from this date.
auditsYesUp to 50 audits, one per location (or per location and year), each the input audit_expense_statement takes (lease_facts, statement_facts, prior_statement_facts, yoy_threshold) plus a label and optionally the landlord. An entry that fails validation is reported with its issues under locations_invalid and the others are audited; the call does not fail for it.
yoy_thresholdNoA line that rose by more than this fraction over the prior year is listed as a question to ask (default 0.10 = 10%), for every location that does not set its own. Must be greater than 0.
include_resultsNoTrue: each location also carries its whole audit_expense_statement result (every finding with its quotes, pages and calculation steps) under result. Default false: each location carries its summary, its findings in short form and result_ref (the digests of its input and result, to check a result against).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds substantial behavior the annotations do not: partial-failure semantics (invalid entries go to locations_invalid while the rest are still audited), determinism with no clock, hosted-API attestation per location, key-tier limits (summary-only without Pro/Team), and per-location metering for report_create. This is unusually rich disclosure.

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?

Content is front-loaded with the purpose and almost every clause carries information, but it is delivered as a few enormous multi-topic sentences mixing return shape, attestation, tier limits and billing. Readability and scannability suffer; splitting into purpose/returns/limits/metering blocks would cost nothing.

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?

For a tool with no output schema, the description fully spells out the return: per-location summary, short-form findings, result_ref, package_items, plus portfolio aggregates, ranked locations, deadlines and repeated issues. Failure handling and metering are covered, so nothing an agent needs to call or interpret it is missing.

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 description coverage is 100%, so the structured fields already explain as_of, yoy_threshold, include_results and each audit entry. The description mostly restates that surface and adds only a cross-reference ('each the input audit_expense_statement takes'), which is already present in the schema text. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Audit many landlord operating-expense (CAM) statements at once', up to 50) and explicitly names the single-audit sibling it wraps: 'Runs audit_expense_statement on each location (the same function, not a second implementation)'. An agent can distinguish batch from single audit without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names the target caller (tenant with many locations, lease audit firm, tenant-rep broker) and routes single audits elsewhere: 'the one free full document ... covers a single audit (audit_expense_statement), not a portfolio'. The when-not condition is explicit rather than inferred.

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.