Skip to main content
Glama

company_returns_ledger

Builds a per-SKU returns ledger, calculating return rates, refunds, handling costs, restock value, and write-downs to identify SKUs above threshold, unsaleable returns, and restocking gaps.

Instructions

Build the sealed returns ledger for the window: per SKU the units sold and returned from the persisted orders, the return rate, the returned orders and their conditions, the refund value at the window's margin report price (built now from the persisted commerce chains), the handling cost, the units the persisted stock positions actually restocked from those returns and the value put back, the write-downs in the window, and the net cost of returns as a share of net revenue; recommendations name SKUs returning above the threshold, returns coming back unsaleable, and resaleable units not yet restocked (payload: optional window_start, window_end).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nowNo
engineNo
operationNobuild
entity_refNo
project_idYes
bundle_jsonYes
payload_jsonNo{}

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It does not state whether this operation mutates data, requires specific permissions, or has rate limits. The term 'Build' hints at a read-only computation, but this is not explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single long run-on sentence with many clauses, making it hard to parse. It is not front-loaded and could be broken into multiple sentences for clarity. The dense list of outputs and calculations overwhelms the reader.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 7 parameters, 0% schema coverage, and no annotations, the description is incomplete. It does not explain how to use the tool, what the output schema contains (even though it exists), or the purpose of required parameters like project_id and bundle_json. The description focuses solely on the content of the ledger, not on how to invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should explain parameters. It only mentions 'payload: optional window_start, window_end', which covers payload_json, but does not explain required parameters like project_id and bundle_json, or other optional parameters like now, engine, operation, and entity_ref.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb 'Build' and resource 'sealed returns ledger' with a detailed list of contents, clearly distinguishing it from siblings by focusing on returns ledger analysis. However, it is verbose and could be more direct, which slightly reduces clarity.

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?

No explicit guidance on when to use this tool vs alternatives. It does not mention conditions, exclusions, or comparisons to other tools, leaving the agent to infer its usage from the 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.

Deploy Server

Other Tools