Skip to main content
Glama

Combined P&L Across Stores

get_combined_pnl
Read-onlyIdempotent

Combined profit and loss across every linked store for a date range (default: last 30 days), converted into one reporting currency. Set per_store to also get the per-store breakdown. Requires a plan covering more than one store.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNoEnd of the date range, in YYYY-MM-DD format, resolved in the tenant's timezone. Defaults to today.
per_storeNoInclude the per-store breakdown alongside the combined totals.
start_dateNoStart of the date range, in YYYY-MM-DD format, resolved in the tenant's timezone. Defaults to 30 days before end_date.
reporting_currencyNoISO 4217 code to convert every store into. Defaults to the primary store currency.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
reasonNo
totalsNo
messageNoPresent on the plan-boundary and no-linked-stores responses, in place of totals.
partialNoTrue when unconverted_store_count is non-zero. Say the total is partial rather than presenting it as complete.
_messageNo
availableNoPresent, and always false, when the plan covers a single store. Its absence is the success case.
per_storeNoOmitted entirely unless a per-store breakdown was requested.
_truncatedNo
date_rangeNo
store_countNo
_tenant_contextNo
reporting_currencyNoThe single currency every total below was converted into.
unconverted_store_countNoStores dropped for a missing FX rate. Non-zero means every total is PARTIAL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, and non-destructive safety profile. The description adds behavioral context beyond that: the default last-30-day range, conversion into one reporting currency, and the multi-store plan requirement. No contradiction with the annotations.

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 short sentences that front-load the core purpose and scope, then mention the optional breakdown and the prerequisite. There is no filler, repetition of the schema, or unnecessary detail.

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?

Given that all parameters are optional, richly described in the schema, and an output schema exists, the description provides the remaining operational context: default date range, currency conversion, per-store mode, and the plan requirement. Nothing essential for correct invocation 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 baseline is 3. The description lightly reinforces per_store and reporting_currency, but it does not add meaning beyond what each parameter's schema description already provides.

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 states a specific verb ('get'), a concrete resource ('combined profit and loss across every linked store'), and key qualifiers: date range, currency conversion, and the per-store breakdown option. It clearly distinguishes itself from single-store P&L tools by emphasizing 'across every linked store' and 'combined'.

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?

The description gives a clear prerequisite ('Requires a plan covering more than one store') and explains when to set per_store. It does not explicitly point to an alternative tool for single-store P&L, so the when-not-to-use guidance is implicit rather than fully explicit.

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