Skip to main content
Glama
profit-lens

profit-lens

Channel P&L

get_channel_pnl
Read-onlyIdempotent

Get profit and loss per acquisition channel with orders, net revenue, CM2, CM3, ad spend, ROAS, and CAC, plus store totals and change vs the previous period.

Instructions

Profit and loss per acquisition channel (Meta, Google, TikTok, email, organic) with orders, new customers, net revenue, CM2, ad spend, CM3, AOV, ROAS, breakeven ROAS and CAC, plus store totals (MER, blended CAC) and the change vs the previous period of the same length.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_channel_pnl"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date (inclusive, YYYY-MM-DD). Requires `from`.
daysNoTrailing window in days, ending on the data as-of date. Ignored when from/to are given.
fromNoStart date (inclusive, YYYY-MM-DD). Requires `to`.
channelNoReturn a single channel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so safety is covered. The description adds real behavioral context beyond that: it discloses that results include a comparison against the previous period of equal length and that store totals are appended alongside per-channel rows. It stops short of stating what window applies when no date parameters are passed.

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?

A single front-loaded sentence that identifies the resource first and then the metric set, with no filler or repetition. The long metric enumeration is informative but reads as a dense dump of eleven fields plus totals, which slightly hurts scannability.

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 read-only analytics tool with no output schema, the description does the heavy lifting by enumerating returned metrics, channel granularity, store totals, and the period-over-period comparison. The main gap is not stating the default trailing window or result shape when no date parameters are supplied.

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 coverage is 100%, so from/to/days/channel semantics are already fully documented, including the 'requires' pairing and the 180-day cap. The description only echoes the channel enum values and implies the comparison baseline; it adds no syntax, format, or precedence details beyond the schema, so the baseline of 3 applies.

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 names a specific resource (profit and loss per acquisition channel) and enumerates the exact metrics returned, including store-level totals (MER, blended CAC). An agent can distinguish this channel-level P&L from sibling tools like get_sku_margins or get_store_overview without opening any schema.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no mention of alternatives, and no stated prerequisites. The only hint about selection is the implicit channel list and the date-window behavior, which lives in the schema rather than the description.

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