Skip to main content
Glama

price_history_with_url

Track and analyze historical price changes for products by entering their URL, enabling informed purchasing decisions and cost monitoring.

Instructions

Product Price History With URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesProduct URL

Implementation Reference

  • The main asynchronous handler function implementing the 'price_history_with_url' tool. It fetches product price history using the provided URL via PriceHistoryService and formats the response with a description and markdown 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 details, 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' """
  • Location where the price_history_with_url tool handler is registered with the BigGoMCPServer instance.
    # Price History # server.add_tool(price_history_graph) # server.add_tool(price_history_with_history_id) server.add_tool(price_history_with_url)

Other Tools

Related 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