Skip to main content
Glama

Settlement net per SKU

settlement_profit_by_sku
Read-only

Groups Amazon settlement report lines by SKU to show units, orders, sales, fees, net, and net per unit, while keeping unattributed charges in a separate group so totals match exactly.

Instructions

Groups the lines of an Amazon settlement report by SKU and returns, for each SKU, units, orders, sales, fees by bucket, net and net per unit. Lines Amazon booked without a SKU (storage, subscription, most reimbursements) are kept as their own unattributed group instead of being spread across products, so the SKU nets plus that group equal the report's net exactly. Set include_lines to see the individual lines behind one SKU.

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": {
      "path": "<path>"
    },
    "name": "settlement_profit_by_sku"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoEnd date (YYYY-MM-DD, inclusive), compared with each line's posted date — the day Amazon moved the money. Omit for the whole report.
skuNoOptional: return only this SKU.
pathYesPath to the settlement report file.
startNoStart date (YYYY-MM-DD, inclusive), compared with each line's posted date — the day Amazon moved the money. Omit for the whole report.
include_linesNoInclude the individual settlement lines per SKU (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description still adds non-obvious behavior by stating the unattributed-bucket policy and the exact reconciliation invariant (SKU nets plus the unattributed group equal the report net). That invariant is the kind of context an agent could not infer from schema or annotations, though volume/pagination behavior for large reports is unaddressed.

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 sentences, front-loaded with what is returned, then the non-obvious grouping rule, then the optional flag. No filler and no repetition of schema text.

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?

There is no output schema, and the description compensates by enumerating the returned fields and explaining the one structural surprise (the unattributed group). For a read-only, five-parameter aggregation tool, an agent has everything needed to call it and interpret the result.

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 path, start, end, sku and include_lines are already documented, including the posted-date semantics. The description only marginally extends this by framing include_lines as a drill-down on a single SKU; that is the baseline-3 situation where the schema does the heavy lifting.

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?

Names a specific verb (groups) and resource (Amazon settlement report lines) and enumerates the exact per-SKU outputs: units, orders, sales, fees by bucket, net, net per unit. It is unmistakably distinct from the sibling list/read tools, which would return reports rather than SKU-level aggregates.

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 a clear condition for the include_lines switch ('to see the individual lines behind one SKU') and explains that non-SKU lines form their own group rather than being spread, which tells the agent when this tool is the right lens. It stops short of explicitly routing the agent away from read_settlement_report for raw line access.

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