Skip to main content
Glama

Diagnose profit anomaly

diagnose_profit_anomaly
Read-only

Diagnoses profit anomalies with read-only profit, sales, and advertising signals for one store and business date range. MCP reporting and workflow metric date ranges use yyyy-MM-dd and include both startDate and endDate, with at most 95 calendar days per range. For longer read-only reports, split into non-overlapping windows: endDate = startDate plus 94 days, capped at the requested end date; the next startDate is the previous endDate plus 1 day. Apply the same limit independently to comparison ranges. Do not average ratios such as ACOS or ROAS across windows; recompute them from summed base metrics. Do not automatically split advertising write plans or metric-based selectors; obtain a supported analysis window from the user. Keyword ranking trends have separate limits: DAILY supports up to 90 inclusive days and RAW up to 31 inclusive days. For keyword ranking trends, use these interval-specific limits when splitting read-only reports. This reporting limit does not apply to campaign scheduling dates.

Input Schema

NameRequiredDescriptionDefault
focusNoOptional focus such as sales, profit, ads, or inventory.
endDateYesBusiness end date in yyyy-MM-dd format. The inclusive range can contain at most 95 days.
storeIdYesStore identifier, in sellerId:marketplaceId format.
startDateYesBusiness start date in yyyy-MM-dd format. The inclusive range can contain at most 95 days.
compareEndDateNoOptional comparison end date in yyyy-MM-dd format. The comparison range independently allows at most 95 inclusive days.
compareStartDateNoOptional comparison start date in yyyy-MM-dd format. The comparison range independently allows at most 95 inclusive days.

Output Schema

NameRequiredDescriptionDefault
scopeNo
metricsNo
summaryNo
evidenceNo
findingsNo
warningsNo
workflowNo
nextQueriesNo
recommendedActionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations, the description discloses meaningful behavior: read-only signals, a 95-day inclusive range limit, window-splitting rules, ratio recomputation guidance, separate keyword-ranking limits, and a campaign-scheduling exception. These details help an agent avoid incorrect reporting behavior, though they are broad and somewhat generic across reporting tools.

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

Conciseness3/5

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

The description is front-loaded with the core purpose, but it is long and includes guidance about keyword ranking trends and campaign scheduling that is not clearly relevant to diagnosing profit anomalies. Much of the later text could be trimmed or moved to a shared reporting guide.

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?

Given the annotations and output schema, the description covers the main operational constraints an agent needs: store/date scope, read-only nature, range limits, comparison handling, and ratio recomputation. It lacks explicit sibling-tool routing, but is otherwise sufficiently complete for the tool's complexity.

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 description coverage is 100%, so the schema already documents all six parameters, including date formats and range limits. The description adds context about splitting long ranges and comparison ranges, but does not substantially extend parameter semantics beyond what the schema provides.

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 clearly states a specific verb and resource: it diagnoses profit anomalies using read-only profit, sales, and advertising signals for one store and date range. It does not explicitly contrast with sibling diagnostic tools, which keeps it below a 5.

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 detailed operational constraints for date ranges and splitting windows, but it does not say when to use this tool versus alternatives such as diagnose_sales_change, diagnose_ad_efficiency, or query_profit. Usage is therefore implied rather than fully routed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources