Skip to main content
Glama

hyperd.watch.create

Subscribe to liquidation alerts for DeFi positions. Receive HMAC-SHA256 signed webhook notifications when health factor reaches a specified severity band.

Instructions

Subscribe to a continuous watch on a wallet/position. Returns watch_id and webhook_secret (shown ONCE — store it; we cannot recover it). HMAC-SHA256 signed alerts POSTed to your webhook_url when threshold conditions are met. v1.0 supports liquidation watches across Aave V3 / Compound v3 / Spark / Morpho. $3.00 USDC prepays for duration_days (default 30, max 90).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesWatch type. v1.0 only supports 'liquidation'.
target_addressesYesWallet to watch (length-1 in v1.0; multi-target reserved for v1.1 Pro tier).
target_chainNoChain to watch. Default 'base'.
webhook_urlYesHTTPS endpoint to POST alerts to. Must be publicly reachable; private/loopback IPs rejected.
fire_on_band_or_worseNoFire when health-factor band reaches this severity OR worse. Default 'warning'.
duration_daysNoWatch lifetime in days. Default 30, max 90.

Implementation Reference

  • src/server.ts:446-469 (registration)
    The tool 'hyperd.watch.create' is registered via server.tool() with a description, Zod schema for inputs (type, target_addresses, target_chain, webhook_url, fire_on_band_or_worse, duration_days), and a handler that calls paidWithBody('POST', '/api/watch/create', args).
    // hyperd.watch.create — subscribe to a continuous watch ($3.00 prepaid)
    server.tool(
      "hyperd.watch.create",
      "Subscribe to a continuous watch on a wallet/position. Returns watch_id and webhook_secret (shown ONCE — store it; we cannot recover it). HMAC-SHA256 signed alerts POSTed to your webhook_url when threshold conditions are met. v1.0 supports liquidation watches across Aave V3 / Compound v3 / Spark / Morpho. $3.00 USDC prepays for duration_days (default 30, max 90).",
      {
        type: z.literal("liquidation").describe("Watch type. v1.0 only supports 'liquidation'."),
        target_addresses: z
          .array(z.string())
          .min(1)
          .max(1)
          .describe("Wallet to watch (length-1 in v1.0; multi-target reserved for v1.1 Pro tier)."),
        target_chain: z
          .enum(["base", "ethereum", "polygon", "arbitrum", "optimism", "avalanche", "bnb"])
          .optional()
          .describe("Chain to watch. Default 'base'."),
        webhook_url: z.string().describe("HTTPS endpoint to POST alerts to. Must be publicly reachable; private/loopback IPs rejected."),
        fire_on_band_or_worse: z
          .enum(["safe", "caution", "warning", "critical"])
          .optional()
          .describe("Fire when health-factor band reaches this severity OR worse. Default 'warning'."),
        duration_days: z.number().int().min(1).max(90).optional().describe("Watch lifetime in days. Default 30, max 90."),
      },
      async (args) => asText(await paidWithBody("POST", "/api/watch/create", args)),
    );
  • The tool handler: async (args) => asText(await paidWithBody('POST', '/api/watch/create', args)). It sends the user arguments to the backend API endpoint /api/watch/create via a POST request with x402 payment.
    async (args) => asText(await paidWithBody("POST", "/api/watch/create", args)),
  • Zod schema defining input validation for hyperd.watch.create: type (literal 'liquidation'), target_addresses (array of 1 string), target_chain (optional enum), webhook_url (string), fire_on_band_or_worse (optional enum), duration_days (optional int 1-90).
    type: z.literal("liquidation").describe("Watch type. v1.0 only supports 'liquidation'."),
    target_addresses: z
      .array(z.string())
      .min(1)
      .max(1)
      .describe("Wallet to watch (length-1 in v1.0; multi-target reserved for v1.1 Pro tier)."),
    target_chain: z
      .enum(["base", "ethereum", "polygon", "arbitrum", "optimism", "avalanche", "bnb"])
      .optional()
      .describe("Chain to watch. Default 'base'."),
    webhook_url: z.string().describe("HTTPS endpoint to POST alerts to. Must be publicly reachable; private/loopback IPs rejected."),
    fire_on_band_or_worse: z
      .enum(["safe", "caution", "warning", "critical"])
      .optional()
      .describe("Fire when health-factor band reaches this severity OR worse. Default 'warning'."),
    duration_days: z.number().int().min(1).max(90).optional().describe("Watch lifetime in days. Default 30, max 90."),
  • The paidWithBody helper function handles POST/DELETE requests with x402 payment dance (wallet auth required). Used by hyperd.watch.create to POST to /api/watch/create.
    async function paidWithBody(
      method: "POST" | "DELETE",
      path: string,
      body: unknown,
      query: Record<string, string | number | boolean | undefined> = {},
    ): Promise<unknown> {
      if (!httpClient) {
        throw new Error(WALLET_NOT_CONFIGURED_MSG);
      }
      const url = new URL(`${API_BASE}${path}`);
      for (const [k, v] of Object.entries(query)) {
        if (v !== undefined && v !== "" && v !== null) url.searchParams.set(k, String(v));
      }
      return paidRequest(method, url, body);
    }
  • The asText helper wraps response data into MCP text content format. Used by the hyperd.watch.create handler to return the result.
    function asText(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior5/5

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

No annotations, but description covers key behaviors: webhook_secret shown once, alerts HMAC-SHA256 signed, prepayment $3 USDC, duration defaults, and supported protocols. No contradictions.

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?

Concise and well-structured: states purpose, return values, behavioral notes, pricing, duration, and protocol support in a few sentences. No unnecessary words.

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

Completeness5/5

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

No output schema, but description explains return values (watch_id, webhook_secret) and covers pricing, duration, protocols, and limitations. Complete for this tool's complexity.

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

Parameters4/5

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

Schema coverage is 100%, but description adds context like 'store secret once', prepayment, and duration defaults which are not in schema. Provides moderate additional value beyond schema.

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?

Description clearly states it subscribes to a continuous watch on a wallet/position, specifies return of watch_id and webhook_secret, and mentions liquidation focus. Differentiates from siblings like watch.cancel and watch.list.

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?

Explains when to use (liquidation watches), notes v1.0 limitations and multi-target reserved for v1.1 Pro tier. Could explicitly mention when not to use, but is clear on context.

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/hyperd-ai/hyperd-mcp'

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