Skip to main content
Glama
profit-lens

profit-lens

SKU contribution margins

get_sku_margins
Read-onlyIdempotent

Calculate contribution margins per SKU across CM1, CM2, and CM3 to reveal which products make money after COGS, fulfillment, fees, and ad spend.

Instructions

Contribution margin per SKU: net revenue, COGS, shipping subsidy, 3PL fulfillment, payment fees and allocated ad spend, reported as CM1 (after COGS), CM2 (after fulfillment and fees) and CM3 (after ads), in dollars, % of net revenue and per unit. Use it to see which products actually make money.

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_sku_margins"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd date (inclusive, YYYY-MM-DD). Requires `from`.
skuNoReturn a single SKU (e.g. "AA-PLNT-CI").
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`.
limitNo
orderNoasc puts the worst SKUs first.asc
sortByNocm3

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered without description help. The description adds real value by defining the CM1/CM2/CM3 cost layering and the three reporting units (dollars, % of net revenue, per unit), but it is silent on the default date window when no from/to/days are supplied and on pagination behavior.

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?

Two sentences, front-loaded with the resource and reporting units, with the cost-component list placed where it clarifies rather than buries the point. The enumerated cost list is dense but each item maps to a real margin definition; only slightly tight for the information carried.

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 no output schema, the description carries the return-shape burden and does so well by specifying margin tiers and the three units of measure. What remains unstated is the default time window when no date parameters are passed, which matters for a seven-parameter analytics tool with zero required parameters.

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 71%, so most of the seven parameters are already documented in the schema, including the useful note that 'asc puts the worst SKUs first'. The description names no parameter and adds no semantics beyond the schema, so baseline 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?

States a specific resource and computation: contribution margin per SKU, enumerating the cost components (COGS, shipping subsidy, 3PL, payment fees, allocated ad spend) and the three margin tiers CM1/CM2/CM3. The 'per SKU' scope plus 'which products actually make money' distinguishes it cleanly from a channel-level tool like get_channel_pnl.

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?

Provides a usage framing ('Use it to see which products actually make money') that implies product-level profitability analysis, but gives no explicit when-not conditions and does not name an alternative tool or the condition that would select one. Usage is implied rather than prescribed.

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