list_price_alerts
Retrieve your current price alerts for Magic: The Gathering cards. Each alert displays the threshold and direction, with free tier restrictions on count and direction.
Instructions
List the authenticated user's price alerts. Free tier is capped at 5 active alerts and a single threshold direction per alert; Premium removes both limits. Requires IWMM_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/alerts.ts:7-13 (handler)The handler for the list_price_alerts tool. It calls apiFetch to GET /api/v1/price-alerts with authentication.
export const listAlertsTool = { name: "list_price_alerts", description: "List the authenticated user's price alerts. Free tier is capped at 5 active alerts and a single threshold direction per alert; Premium removes both limits. Requires IWMM_API_KEY.", inputSchema: z.object({}), handler: () => apiFetch({ path: "/api/v1/price-alerts", authenticated: true }), }; - src/tools/alerts.ts:7-13 (schema)The input schema for list_price_alerts is an empty Zod object (z.object({})), meaning no arguments are required.
export const listAlertsTool = { name: "list_price_alerts", description: "List the authenticated user's price alerts. Free tier is capped at 5 active alerts and a single threshold direction per alert; Premium removes both limits. Requires IWMM_API_KEY.", inputSchema: z.object({}), handler: () => apiFetch({ path: "/api/v1/price-alerts", authenticated: true }), }; - src/tools/index.ts:28-29 (registration)Import of listAlertsTool from ./alerts.js into the tools registry.
import { listAlertsTool, - src/tools/index.ts:78-79 (registration)listAlertsTool is included in the exported tools array, which is used by the MCP server to list and call tools.
// Price alerts (auth) listAlertsTool, - src/tools/index.ts:90-92 (registration)A toolsByName lookup map is built from the tools array, allowing the server to dispatch calls to list_price_alerts by name.
export const toolsByName: Record<string, ToolDefinition> = Object.fromEntries( tools.map((t) => [t.name, t]), );