Skip to main content
Glama
aweher

invoiceninja-mcp

by aweher

invoiceninja_run_report

Read-only

Run aggregated reports for invoices, payments, expenses, profit & loss, and tax summaries to return rows. If not ready, returns a report ID for later retrieval.

Instructions

Run an Invoice Ninja report (invoices, payments, expenses, profit & loss, aged receivables, tax summaries, product sales, …) and return its rows. Best for aggregates over many records. Reports are generated asynchronously: if not ready within max_wait_seconds a report_id is returned for invoiceninja_get_report_result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
extraNoAdditional report parameters, e.g. {'product_key': 'X'}
reportYesWhich report to run
date_keyNoDate column the period applies to, e.g. 'date' or 'due_date'
end_dateNoDate as YYYY-MM-DD
max_rowsNoMaximum rows to return
client_idNoRestrict to one client (hashed id)
date_rangeNoPeriod; 'custom' requires start_date and end_datethis_year
start_dateNoDate as YYYY-MM-DD
include_taxNoprofitloss only: include taxes
report_keysNoColumns to include, e.g. ['invoice.number','invoice.balance']. Empty = all columns (keys are listed in every result)
include_deletedNo
response_formatNo'markdown' (default) for a readable summary, 'json' for complete machine-readable data (empty fields removed)markdown
is_income_billedNoprofitloss only: true = income from invoices, false = from payments
max_wait_secondsNoSeconds to wait for the report before returning its id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, openWorld), and the description adds genuinely new behavior: reports are generated asynchronously, max_wait_seconds bounds the wait, and a report_id is returned on timeout for later retrieval. It also discloses the default markdown vs. json response shape. It doesn't mention rate limits or cost, so not a 5.

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

Conciseness5/5

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

Three front-loaded sentences: purpose with examples, usage recommendation, then the async contract. Every sentence carries information and nothing is repeated from the schema.

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 14-parameter tool with no output schema, the description covers the essentials an agent needs: what comes back (rows), the markdown/json toggle, and — critically — the asynchronous timeout path and how to resume via invoiceninja_get_report_result. Report-specific parameter nuance is left to the schema, which is reasonable given 93% coverage.

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 already 93%, so the baseline is 3; the description adds value by explaining the async contract of max_wait_seconds (returns an id rather than data on timeout) and noting that report_keys are listed in every result. It references the 'extra' escape hatch indirectly but doesn't detail per-report parameter differences, which the schema also leaves implicit.

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 ('Run an Invoice Ninja report ... return its rows') and enumerates concrete report types (invoices, payments, expenses, profit & loss, aged receivables, tax summaries, product sales). The clause 'Best for aggregates over many records' distinguishes it from the many list_* siblings that return individual records.

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

Usage Guidelines4/5

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

Gives explicit selection guidance ('Best for aggregates over many records') and names the follow-up path when the report isn't ready — invoiceninja_get_report_result keyed by report_id. It stops short of stating when NOT to use it (e.g. for single-record lookups), but the routing to the async sibling and the aggregate framing make usage clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.