Skip to main content
Glama

price_history_with_url

Track product price changes over time by providing a product URL. This tool retrieves historical pricing data to help identify trends and optimal purchase timing.

Instructions

Product Price History With URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesProduct URL

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main asynchronous handler function for the 'price_history_with_url' tool. It accepts a product URL, retrieves the price history via PriceHistoryService, and returns a markdown-formatted response including description and graph image.
    async def price_history_with_url(
        ctx: Context,
        url: Annotated[str, Field(description="Product URL")],
    ) -> str:
        """Product Price History With URL"""
    
        logger.info("price history with url, url: %s", url)
    
        setting = get_setting(ctx)
        service = PriceHistoryService(setting)
        ret = await service.history_with_url(url=url, days="180")
        if ret is None:
            return "No price history found"
    
        return PriceHistoryToolResponse(
            price_history_description=ret.description,
            price_history_graph=f"![Price History Graph]({ret.graph_link})",
        ).slim_dump()
  • Pydantic model defining the structured output response for the price_history_with_url tool, including price history description, graph markdown, and display instructions.
    class PriceHistoryToolResponse(BaseToolResponse):
        price_history_description: PriceHistoryAPIRet
        price_history_graph: str
        display_rules: str = """
    Field explanation:
    'price_history_description': includes detailed price history info.
    'price_history_graph': includes a markdown image link used for visualizing price history.
    
    Here are a list of rules you must follow:
    Rule 1: Both 'price_history_description' and the link provided at 'price_history_graph' field must be included in the output.
    Rule 2: Product url must be included, it can be found in 'price_history_description'
        """
  • Registers the price_history_with_url tool handler with the MCP server instance.
    server.add_tool(price_history_with_url)
  • Imports the price_history_with_url tool handler from the tools module for server registration.
    from ..tools.price_history import (
        price_history_with_url,
    )
Behavior1/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 of behavioral disclosure. The description fails to explain any behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, error conditions, or what the output entails. It merely states what the tool is without describing how it behaves.

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 overly concise to the point of under-specification, consisting of only four words that restate the tool name. It lacks structure and fails to front-load critical information, making it inefficient for an agent to understand the tool's purpose without additional context.

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 complexity of retrieving price history data, the description is incomplete. Although an output schema exists, the description does not provide necessary context such as the scope of historical data, time frames, or data sources. With no annotations and minimal description, it leaves significant gaps in understanding the tool's functionality and limitations.

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?

The input schema has 100% description coverage, with the single parameter 'url' clearly documented as 'Product URL'. The description does not add any additional meaning beyond the schema, such as URL format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema adequately covers parameter semantics.

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

Purpose2/5

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

The description 'Product Price History With URL' restates the tool name with minimal elaboration, making it tautological. It mentions 'Product Price History' which suggests retrieving historical pricing data, but lacks a specific verb or clear differentiation from the sibling tool 'product_search'. The purpose is vague without explaining what action the tool performs.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus the sibling 'product_search' or other alternatives. The description does not indicate any context, prerequisites, or exclusions for usage, leaving the agent with no information to make an informed choice between tools.

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/Funmula-Corp/BigGo-MCP-Server'

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