Skip to main content
Glama

Get P&L Report

get_pl_report
Read-onlyIdempotent

Generate a profit-and-loss summary by category for a date range, optionally scoped to one customer or rolled up per customer, excluding transactions marked exclude_from_reports.

Instructions

Return a profit & loss summary grouped by category for a given date range. Excludes transactions marked exclude_from_reports. Pass customer_id to scope the report to a single attributed customer, or group_by_customer: true to include a per-customer rollup alongside the category breakdown. Transactions with no customer attribution bucket as 'Unattributed' in the rollup. Response includes a render field with tiered rendering guidance - check it before composing your reply.

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": {
      "from_date": "<from_date>",
      "to_date": "<to_date>"
    },
    "name": "get_pl_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
to_dateYesEnd date (YYYY-MM-DD, inclusive).
from_dateYesStart date (YYYY-MM-DD, inclusive).
customer_idNoOptional. Restrict the report to transactions attributed to this customer.
group_by_customerNoOptional. When true, include a `by_customer` rollup with per-customer income, expenses, and net. Transactions without a customer attribution bucket as 'Unattributed'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds real behavioral detail beyond that: transactions flagged exclude_from_reports are omitted, and unattributed transactions are bucketed as 'Unattributed' in the rollup. Missing is any note on aggregation semantics (e.g., how refunds or transfers are treated), which would have pushed this higher.

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?

Four short sentences, front-loaded with the core operation, then optional modes, then an edge case, then a response-handling instruction. Every sentence carries information; the only mild redundancy is the Unattributed rule appearing both here and in 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?

There is no output schema, so the description usefully discloses that the response contains a render field with tiered rendering guidance — an important instruction the agent could not otherwise know. Combined with the exclusion rule and rollup semantics, this covers what an agent needs for a read-only reporting tool, though aggregation edge cases remain unstated.

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, and the description earns a bump by explaining the interaction between the optional parameters rather than merely restating them — `group_by_customer` produces a rollup 'alongside the category breakdown' while `customer_id` restricts the whole report. The Unattributed bucketing is repeated from the schema, which limits the added value.

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 ('Return a profit & loss summary grouped by category') plus the scoping dimension (date range), which is enough for an agent to distinguish it from generic summary tools. It stops short of naming the closest sibling (get_financial_summary) or explaining how the two differ, so differentiation is inferred rather than explicit.

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 concrete selection guidance for the two optional parameters: use `customer_id` to scope to one attributed customer, or `group_by_customer: true` to get a per-customer rollup alongside the category breakdown. It also instructs the agent to check the render field before replying, which is actionable context. It does not state when to prefer this over get_financial_summary or when not to use it at all.

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

Deploy Server

Other Tools