Skip to main content
Glama

company_customer_profitability

Build a customer profitability report for a period, computing revenue, costs, contribution, margin, AOV, return rate, and customer class, with concentration and reconciliation to margin totals.

Instructions

Build the sealed customer profitability for the window: per customer (the opaque ref each persisted order was captured with) orders, units, returns, net revenue, landed cost, fees, fulfilment, return handling, contribution, margin, average order value, return rate, rank, share, and a class (core, promising, drain, long tail), with the concentration and whether the totals tie to the margin report (payload: optional window_start, window_end, target_margin_percent, return_rate_threshold_percent, core_share_percent).

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

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description bears the full burden of disclosing behavior. It says 'build' and lists what is produced, but does not state side effects (e.g., whether the output persists, whether it mutates any state), data prerequisites, or performance characteristics. It does mention the payload and tie-out, which gives some transparency about scope and validation.

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?

The description is a single dense sentence that front-loads the primary action and then lists the outputs and payload fields. While long, it is information-dense and avoids filler; the structure is acceptable though a more segmented layout would improve readability.

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 large schema (7 params) and that the output schema exists, the description still omits critical context: what project_id/bundle_json should contain, what 'sealed' means, what the concentration/tie-out imply, and how to select among similar company_* margin tools. It is incomplete for a tool of this complexity.

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 must compensate, but it only explains the payload_json sub-fields (window_start, etc.). It gives no meaning for required parameters project_id and bundle_json, nor for now, engine, operation, entity_ref. The two required fields are entirely unexplained, leaving the agent without the means to construct a valid call.

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 opens with a clear, specific action ('Build the sealed customer profitability for the window') and enumerates the exact outputs (per-customer metrics, class assignment, concentration, tie-out). It is easily distinguishable from sibling tools like company_product_margin or company_services_margin because it is explicitly customer-centric and references bespoke constructs like 'sealed' and 'opaque ref'.

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?

The description gives context (window, payload parameters) but never states when to use this versus alternative profitability tools. It does not mention exclusions, prerequisites, or conditions under which another tool would be preferred. The guidance is implied at best.

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