Skip to main content
Glama

hyperd.watch.cancel

Cancel a watch you own to stop monitoring. Provide the watch ID; incurs a $0.001 USDC fee. Returns 404 if the watch does not exist or you are not the owner.

Instructions

Cancel a watch you own. $0.001 USDC ops fee covers the x402 auth path. Returns 404 (not 403) if the watch_id doesn't exist OR if you're not the owner — no existence-leak side-channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
watch_idYesThe watch_id returned from hyperd.watch.create.

Implementation Reference

  • src/server.ts:479-488 (registration)
    Registration of the hyperd.watch.cancel tool via server.tool(), with Zod schema for watch_id input and a handler that sends a DELETE to /api/watch/cancel.
    // hyperd.watch.cancel — cancel an active watch ($0.001 ops fee)
    server.tool(
      "hyperd.watch.cancel",
      "Cancel a watch you own. $0.001 USDC ops fee covers the x402 auth path. Returns 404 (not 403) if the watch_id doesn't exist OR if you're not the owner — no existence-leak side-channel.",
      {
        watch_id: z.string().describe("The watch_id returned from hyperd.watch.create."),
      },
      async (args) =>
        asText(await paidWithBody("DELETE", "/api/watch/cancel", undefined, { watch_id: args.watch_id })),
    );
  • The inline handler function for hyperd.watch.cancel, which calls paidWithBody with DELETE method and passes watch_id as query parameter.
    async (args) =>
      asText(await paidWithBody("DELETE", "/api/watch/cancel", undefined, { watch_id: args.watch_id })),
  • Zod input schema for hyperd.watch.cancel — accepts a single required string field 'watch_id'.
    {
      watch_id: z.string().describe("The watch_id returned from hyperd.watch.create."),
    },
  • Helper function paidWithBody used by the handler to make x402-authenticated requests with a body (DELETE/POST).
    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);
    }
  • Helper function asText that wraps JSON response into MCP text content format.
    function asText(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior4/5

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

With no annotations, the description discloses the ops fee, x402 auth path, and 404 vs 403 behavior to prevent side-channel leaks. However, it does not mention the success response or any other side effects beyond cancellation.

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?

Two concise sentences with front-loaded purpose. No extraneous information.

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

Completeness4/5

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

Covers main purpose, fee, auth, and error behavior. Lacks description of success response or return value, but the tool is simple and no output schema exists.

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 coverage is 100% with clear description for watch_id. The tool description adds no additional meaning beyond what the schema already provides for the only parameter.

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?

Clearly states it cancels a watch owned by the user. Verb 'cancel' plus resource 'a watch you own' distinguishes it from sibling tools like create and 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?

Explicitly states when to use (cancel a watch you own) and includes context on the fee and auth path, but does not provide explicit when-not-to-use or comparisons to alternatives.

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