Skip to main content
Glama

Generate profit and loss

generate_profit_and_loss
Read-onlyIdempotent

Generates a standard profit and loss statement for one chart over an optional inclusive date range: revenue and expense accounts with totals and net income. chart_id is required only when the workspace has more than one active chart; omitted bounds are open-ended; include_zero_accounts defaults to true. Amounts are summed as posted. completeness says what the books lack: a chart_exception (nothing posted since the data changed), open requests, notices. Read-only and not metered.

Input Schema

NameRequiredDescriptionDefault
date_toNoOptional inclusive end date in YYYY-MM-DD format. Omitted is open-ended.
chart_idNoOptional chart id. Required when the workspace has more than one active chart; may be omitted when exactly one exists.
date_fromNoOptional inclusive start date in YYYY-MM-DD format. Omitted is open-ended.
workspace_tagYesActive workspace id (the workspace_tag create_workspace and list_workspaces return).
include_zero_accountsNoInclude chart accounts with no posting activity. Defaults to true.

Output Schema

NameRequiredDescriptionDefault
engineYesStamped engine build/version identity for the tool result.
statusYesprofit_and_loss_generated on success.
date_toYesInclusive end; null is open-ended.
revenueYesRevenue rows.
chart_idYesThe one chart this report covers.
expensesYesExpense rows.
date_fromYesInclusive start; null is open-ended.
row_countYesNumber of returned rows.
chart_nameYesThe chart's name.
net_incomeYestotal_revenue minus total_expenses.
completenessYesWhat these books lack. complete is true only with no chart_exception and no open request. A chart with an exception has posted nothing since the data changed, so the numbers predate it; open requests (list_review_items, level request) leave the books short or provisional; notices change nothing.
total_revenueYesSum of detail revenue amounts.
workspace_tagYesWorkspace scoped by the tool call.
total_expensesYesSum of detail expense amounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered; the description adds genuinely new behavior: amounts are summed as posted, and the completeness field reports gaps (chart_exception, open requests, notices). 'Not metered' also adds cost/quota context absent from annotations, though 'Read-only' merely restates them.

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?

Dense but front-loaded: the statement type and contents come first, then input conditions, then result semantics. Nearly every clause carries information, though the trailing 'Read-only and not metered' half-duplicates the annotations and the run-on phrasing packs five distinct rules into one block.

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?

With an output schema present and full parameter documentation, the description need not explain return structures, and it still covers aggregation basis, chart disambiguation, open-ended dates, and the meaning of the completeness field. Minor gaps remain around accounting basis and whether comparative periods are included, but nothing an agent needs to invoke it correctly is missing.

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 100%, so the baseline is 3; the description largely mirrors the schema on chart_id, date bounds, and include_zero_accounts. It earns above baseline only through 'Amounts are summed as posted', which conveys the aggregation basis rather than restating parameter definitions.

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?

States a specific verb and resource ('Generates a standard profit and loss statement for one chart') and defines the output contents (revenue and expense accounts, totals, net income), which implicitly separates it from generate_balance_sheet and generate_trial_balance. It never names those siblings, so routing still requires the agent to infer from accounting knowledge.

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?

Gives useful conditional guidance on inputs ('chart_id is required only when the workspace has more than one active chart', omitted bounds are open-ended), but says nothing about when to choose this statement over generate_balance_sheet, generate_trial_balance, or generate_report, and no exclusions are stated. Usage is implied rather than directed.

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