Skip to main content
Glama

Profit and Loss Summary

get_pnl_summary
Read-onlyIdempotent

Get a profit and loss summary for the tenant's store over a date range, broken down by revenue, COGS, ad spend, expenses, fees, and net profit. Optionally compare to the previous period or previous year for percentage deltas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateYesEnd of the date range in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).
compare_toNoOptional comparison window - 'previous_period' compares to the immediately preceding range of equal length; 'previous_year' compares to the same date range last year
start_dateYesStart of the date range in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
periodNo
totalsNo
_messageNo
currencyNo
_truncatedNo
comparisonNoNull unless compare_to was supplied.
store_nameNo
_tenant_contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the comparison feature and the breakdown categories, but does not disclose additional behaviors like data freshness, handling of missing periods, or whether the summary is tenant-scoped (though that's implied). It does not contradict annotations, so a 3 is appropriate.

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?

The description is a single, well-structured sentence that front-loads the core purpose and then mentions the optional comparison. No wasted words; it is concise and immediately informative.

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?

Given the tool has an output schema (not shown but present), the description need not detail return values. The description covers the main behavior, optional comparison, and the breakdown components. Minor gaps like timezone resolution are already in parameter descriptions, and the read-only nature is in annotations. It is adequately complete for a read-only summary tool.

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 parameters (start_date, end_date, compare_to) are already well-documented with types, formats, and meaning. The description reinforces the date-range and comparison concepts but adds no new parameter syntax or constraints beyond what the schema provides. Baseline 3 applies when schema carries the burden.

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?

The description clearly states it retrieves a profit and loss summary over a date range, broken down by specific financial components, and optionally compares to previous periods. It names the resource (P&L summary), the action (get), and the scope (date range), which distinguishes it from siblings like get_revenue_breakdown or get_expenses_breakdown.

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?

The description implies its use case (getting a P&L summary) but does not explicitly state when to prefer this over alternatives like get_combined_pnl or get_date_range_summary. No exclusions or alternative tools are mentioned, so the agent must infer when this is the right choice from the tool name and description alone.

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