Skip to main content
Glama

cancel_watch

Stop and remove a watcher by providing its watch ID to discontinue monitoring activities.

Instructions

Stop and remove a watcher

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
watch_idYesWatch ID to cancel

Implementation Reference

  • The handler logic for the 'cancel_watch' tool, which validates the input, cancels the watch from the registry, and marks it as inactive in the database.
    private async handleCancelWatch(args: Record<string, unknown>) {
      const schema = z.object({ watch_id: z.string() });
      const { watch_id } = schema.parse(args);
    
      const cancelled = this.registry.cancel(watch_id);
      if (cancelled) {
        deactivateWatch(watch_id);
      }
    
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify({ watch_id, cancelled }),
        }],
      };
  • Helper function that updates the database to mark a watch as inactive.
    export function deactivateWatch(id: string): void {
      const db = getDb();
      db.prepare(`UPDATE watches SET active = 0 WHERE id = ?`).run(id);
    }
  • src/server.ts:148-148 (registration)
    Registration of the 'cancel_watch' tool with its schema definition in the server configuration.
    name: 'cancel_watch',
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. While 'remove' implies mutation, it lacks critical behavioral details: failure mode if watch_id is invalid, whether cancellation is immediate or graceful, and effects on the underlying resource being watched.

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?

Extremely terse at 5 words, but no wasted sentences. However, given zero annotations and a complex sibling ecosystem, the brevity leaves operational gaps that a slightly longer description could address.

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

Completeness2/5

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

Inadequate for the tool ecosystem complexity (8 siblings including multiple watch types). No output schema or annotations means the description should explain the watch lifecycle and relationship to other tools, which it does not.

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?

With 100% schema description coverage ('Watch ID to cancel'), the schema documents the parameter adequately. The description adds no additional semantics beyond implying the watch_id comes from an existing watcher, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States clear verbs ('Stop and remove') and resource ('watcher'), distinguishing it from creation-oriented siblings like watch_file. However, it doesn't explicitly clarify that this operates on watches created by the various watch_* tools or confirm it works across all watch types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites (e.g., obtaining watch_id from list_watches or creation tools) or cleanup implications.

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/jarvisassistantux/loopsense'

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