Skip to main content
Glama
bunkerapps

Superprecio MCP Server

by bunkerapps

set_price_alert

Monitor product prices and receive notifications when they drop to your target price. Track items by name or barcode across supermarkets to save money on purchases.

Instructions

Set a personalized price alert for a product.

Get notified when a product reaches your target price!

Features:

  • Monitor any product by name or barcode

  • Set your desired price target

  • Automatic price checking across all supermarkets

  • Get alerts when price drops below your target

Perfect for:

  • Waiting for sales on expensive items

  • Tracking price drops

  • Budget-conscious shopping

  • Never missing a good deal

Example: "Alert me when Coca Cola 2.25L drops below $800"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productNameYesProduct name to monitor (e.g., "Coca Cola 2.25L", "Arroz integral")
targetPriceYesTarget price in pesos - alert when product reaches or goes below this price
barcodeNoOptional barcode/EAN for exact product matching
userIdNoOptional user ID to associate this alert with
notifyEnabledNoEnable push notifications when alert triggers (default: true)

Implementation Reference

  • The main handler function that executes the set_price_alert tool logic: calls the API to create a price alert, handles success/error, and formats a detailed response with alert info.
    export async function executeSetPriceAlert(
      client: SuperPrecioApiClient,
      args: {
        productName: string;
        targetPrice: number;
        barcode?: string;
        userId?: number;
        notifyEnabled?: boolean;
      }
    ) {
      const response = await client.createPriceAlert(args);
    
      if (!response.success) {
        return {
          content: [
            {
              type: 'text',
              text: `Failed to create price alert: ${response.message || 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    
      const alert = response.data;
    
      const summary = `
    πŸ”” Price Alert Created Successfully!
    
    πŸ“¦ Product: ${alert.productName}
    ${alert.barcode ? `🏷️  Barcode: ${alert.barcode}` : ''}
    🎯 Target Price: $${alert.targetPrice.toLocaleString('es-AR')}
    πŸ†” Alert ID: ${alert.id}
    ${alert.notifyEnabled ? 'βœ… Notifications: Enabled' : 'πŸ”• Notifications: Disabled'}
    πŸ“… Created: ${new Date(alert.createdAt).toLocaleDateString('es-AR')}
    
    What happens now:
    1. We'll search for this product across all supermarkets
    2. When the price drops to $${alert.targetPrice} or below, you'll be notified
    3. Use get_my_alerts to check the status anytime
    4. Use remove_price_alert to cancel this alert
    
    πŸ’‘ Tip: Run check_alert_status periodically to see current prices!
    `;
    
      return {
        content: [
          {
            type: 'text',
            text: summary,
          },
          {
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Defines the tool metadata including name 'set_price_alert', description, and inputSchema for parameter validation (productName, targetPrice required; barcode, userId, notifyEnabled optional).
    export const setPriceAlertTool = {
      name: 'set_price_alert',
      description: `Set a personalized price alert for a product.
    
    Get notified when a product reaches your target price!
    
    Features:
    - Monitor any product by name or barcode
    - Set your desired price target
    - Automatic price checking across all supermarkets
    - Get alerts when price drops below your target
    
    Perfect for:
    - Waiting for sales on expensive items
    - Tracking price drops
    - Budget-conscious shopping
    - Never missing a good deal
    
    Example: "Alert me when Coca Cola 2.25L drops below $800"`,
      inputSchema: {
        type: 'object',
        properties: {
          productName: {
            type: 'string',
            description: 'Product name to monitor (e.g., "Coca Cola 2.25L", "Arroz integral")',
          },
          targetPrice: {
            type: 'number',
            description: 'Target price in pesos - alert when product reaches or goes below this price',
            minimum: 0.01,
          },
          barcode: {
            type: 'string',
            description: 'Optional barcode/EAN for exact product matching',
          },
          userId: {
            type: 'number',
            description: 'Optional user ID to associate this alert with',
          },
          notifyEnabled: {
            type: 'boolean',
            description: 'Enable push notifications when alert triggers (default: true)',
            default: true,
          },
        },
        required: ['productName', 'targetPrice'],
      },
    };
  • src/index.ts:160-161 (registration)
    Registers the tool handler in the MCP server's CallToolRequestSchema switch statement, dispatching calls to executeSetPriceAlert.
    case 'set_price_alert':
      return await executeSetPriceAlert(apiClient, args as any);
  • src/index.ts:108-108 (registration)
    Includes setPriceAlertTool in the list of available tools returned by ListToolsRequestSchema.
    setPriceAlertTool,
  • src/index.ts:44-44 (registration)
    Imports the tool definition and handler from the implementation file.
    import { setPriceAlertTool, executeSetPriceAlert } from './tools/setPriceAlert.js';
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: the tool creates alerts that trigger automatically when prices drop below targets, monitors across supermarkets, and sends notifications. However, it lacks details on persistence (how long alerts last), error handling, authentication requirements (though userId is optional), or rate limits, which are important for a creation tool.

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

Conciseness4/5

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

The description is well-structured with clear sections (Features, Perfect for, Example) and front-loaded with the core purpose. However, some bullet points (e.g., 'Budget-conscious shopping') are slightly redundant with others, and the marketing tone ('Never missing a good deal') adds minor fluff that doesn't aid tool selection.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description is moderately complete. It covers the what and why but lacks details on behavioral constraints (e.g., limits on alerts per user), error cases, or response format. Given the complexity of setting up automated monitoring, more operational context would be helpful for an agent to use it correctly.

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 5 parameters thoroughly. The description adds minimal value beyond the schemaβ€”it mentions monitoring by 'name or barcode' and 'target price' but doesn't explain parameter interactions or provide additional context like format examples beyond the schema's descriptions. Baseline 3 is appropriate when schema does the heavy lifting.

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 clearly states the tool's purpose with a specific verb ('Set a personalized price alert') and resource ('for a product'). It distinguishes from siblings like 'get_my_alerts' (which retrieves alerts) and 'remove_price_alert' (which deletes alerts) by focusing on creation. The opening sentence directly answers 'what does this tool do?'

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?

The 'Perfect for:' section provides clear context on when to use this tool (waiting for sales, tracking price drops, budget shopping). However, it doesn't explicitly state when NOT to use it or name specific alternatives like 'compare_prices' for immediate price checking or 'get_best_deals' for finding current discounts, leaving some ambiguity about tool selection.

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/bunkerapps/superprecio_mcp'

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