Skip to main content
Glama

Pridly — AI copilot for PrestaShop

Profit margin by product

margin_report
Read-only

Revenue, cost and margin for the products sold in a period. Needs cost prices stored in the shop (the Cost price field on each product). Products without a cost are left out and counted.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many rows to return (max 100).
storeNoStore address or id. Leave empty if you have only one store.
periodNotoday, yesterday, this_week, last_week, this_month, last_month, last_7_days, last_30_days, last_90_days, this_year, last_year — or YYYY-MM-DD..YYYY-MM-DD. Uses the store's own timezone.last_30_days

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive), so the description earns credit for what they cannot say: the dependency on stored cost prices and the exclusion rule that cost-less products are dropped and tallied. The only omission is the return shape, which is not covered by an output schema.

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?

Two sentences, no filler, and the output content leads before the prerequisites. Every clause carries information: what you get, what is required, and how missing data is treated.

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 three optional, fully documented parameters and no output schema, the description covers purpose, prerequisite and edge-case handling. The residual gap is that 'counted' implies an extra field in the response that an agent must discover at call time, since no output schema declares it.

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%, including the period enum values and the limit ceiling, so the schema already carries the parameter burden. The description only echoes 'in a period' and says nothing about how store, period or limit affect results, which matches the baseline for fully documented schemas.

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 names the exact metrics (revenue, cost, margin) and the exact grain (products sold in a period), which is more specific than the title and clearly distinct from revenue-only siblings like get_sales_summary or top_products. It stops short of naming the sibling it replaces, so an agent must infer the boundary itself.

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?

It states a real precondition: the shop must have cost prices in the 'Cost price' field, otherwise the tool is not useful. That is actionable context an agent can check before calling. It gives no explicit contrast with adjacent tools (top_products, compare_periods, multi_store_report), so the when-not guidance is incomplete.

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