Skip to main content
Glama
MealCP

MealCP MCP

Official
by MealCP

get_price_history

Retrieve aggregated price-history statistics for a product over a specified date range, including min, max, average, and net change across all stores.

Instructions

Get aggregated price-history stats for one product over a date range.

Returns min/max/avg/first/last price plus the net change over the window, pooled across every store carrying the product. Pair with search_products first and pass a hit's id here verbatim.

Args: product_id: Opaque product id from a search hit (e.g. rp_550e8400e29b41d4a8b2c3d1e9f7a6c8). from_date: ISO date, inclusive lower bound (e.g. "2026-01-01"). to_date: ISO date, inclusive upper bound; defaults to today.

Returns: Aggregated price-history stats.

Raises: mcp.server.mcpserver.exceptions.ToolError: If the API is unavailable or the product is not found; the message starts with the API's stable error token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
to_dateNo
from_dateYes
product_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
brandNo
changeNo
to_dateYes
currencyNo
avg_priceNo
from_dateYes
max_priceNo
min_priceNo
change_pctNo
last_priceNo
first_priceNo
store_countNo
retailer_slugYes
last_observed_atNo
first_observed_atNo
observation_countYes
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses error behavior (ToolError with stable token), the aggregation scope ('pooled across every store'), and the inclusive date semantics. It implies a read-only operation via 'get' but does not explicitly state idempotency or lack of side effects. Given the absence of annotations, the description is thorough, though a brief note on read-only nature would make it fully transparent.

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?

The description is well-structured with a leading one-sentence purpose, then a compact Args/Returns/Raises layout. Every sentence adds value—examples for product_id and dates, explicit defaults, and error detail—without redundancy. It is front-loaded with the core function and avoids fluff, making it easy to scan.

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?

There is an output schema, so the minimal 'Returns: Aggregated price-history stats' is acceptable since the schema provides structure. The description covers the usage prerequisite (search first), parameter details, aggregation behavior, and error conditions. The only minor gap is a lack of mention of any range limits or rate limiting, but that's not essential given the tool's simplicity and the existence of an output schema.

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

Parameters5/5

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

The input schema has 0% description coverage, so the description must fully explain each parameter. It does this exceptionally: product_id is defined as 'Opaque product id from a search hit' with a concrete example; from_date and to_date are described with format and inclusiveness, plus a default for to_date. This far exceeds what the bare schema provides and gives the agent all necessary context.

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 specific verb+resource ('Get aggregated price-history stats') and clearly scopes it to 'one product over a date range'. It enumerates the exact statistics returned (min/max/avg/first/last price and net change), which distinguishes it from the sibling tool search_products, which is about discovering products rather than analyzing history. This is unambiguous and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs the agent to 'Pair with search_products first and pass a hit's id here verbatim', establishing a clear workflow and the prerequisite. It also clarifies the required input source. While it doesn't state 'when not to use', the pair-with guidance and the fact that it's for a single product implies the alternative use case, making the routing clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MealCP/mealcp-mcp-python'

If you have feedback or need assistance with the MCP directory API, please join our Discord server