Skip to main content
Glama
jaredhobbs

cronalert-mcp

delete_monitor

Destructive

Permanently remove a CronAlert uptime monitor and its entire check history. This action cannot be undone.

Instructions

Permanently delete a monitor and all its check history. This cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMonitor ID

Implementation Reference

  • The handler function that executes the delete_monitor tool. It accepts an id parameter and makes a DELETE request to the /monitors/{id} API endpoint, returning the response as JSON.
    async ({ id }) => {
      const data = await apiRequest(`/monitors/${id}`, { method: "DELETE" });
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
  • src/index.ts:159-175 (registration)
    The complete registration of the delete_monitor tool with the MCP server, including the tool name, description, schema, hints (destructive), and the handler function.
    server.tool(
      "delete_monitor",
      "Permanently delete a monitor and all its check history. This cannot be undone.",
      {
        id: z.string().describe("Monitor ID"),
      },
      {
    
          readOnlyHint: false,
          destructiveHint: true,
          openWorldHint: false,
      },
      async ({ id }) => {
        const data = await apiRequest(`/monitors/${id}`, { method: "DELETE" });
        return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
      }
    );
  • Zod schema defining the input validation for delete_monitor tool. It requires a single parameter 'id' as a string representing the Monitor ID.
    {
      id: z.string().describe("Monitor ID"),
    },
  • The apiRequest helper function used by delete_monitor handler to make authenticated HTTP requests to the CronAlert API. It handles API key retrieval, request headers, error handling, and JSON response parsing.
    async function apiRequest(
      path: string,
      options: RequestInit = {}
    ): Promise<unknown> {
      const apiKey = getApiKey();
      const url = `${API_BASE}${path}`;
    
      const response = await fetch(url, {
        ...options,
        headers: {
          "Content-Type": "application/json",
          Authorization: `Bearer ${apiKey}`,
          ...options.headers,
        },
      });
    
      if (!response.ok) {
        const body = await response.text();
        throw new Error(`API error ${response.status}: ${body}`);
      }
    
      return response.json();
    }
Behavior4/5

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

Annotations already declare destructiveHint=true, but the description adds valuable context about what gets destroyed ('all its check history') and the permanence ('cannot be undone'). This goes beyond the annotations by specifying the scope of destruction and irreversible nature.

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 sentences with zero waste - the first states the action and scope, the second warns about irreversibility. Every word earns its place and the most critical information is front-loaded.

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?

For a destructive operation with good annotations and simple parameters, the description provides adequate context about what gets deleted and the permanence. However, without an output schema, it doesn't describe what the tool returns upon success/failure.

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% with the single 'id' parameter fully documented. The description doesn't add any parameter-specific information beyond what the schema provides, so baseline 3 is appropriate.

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 specific action ('Permanently delete') and resource ('a monitor and all its check history'), distinguishing it from sibling tools like update_monitor or get_monitor. It provides explicit scope beyond just the monitor itself.

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 description implicitly indicates this should be used for permanent removal of monitors, but doesn't explicitly state when to choose this over alternatives like update_monitor or when not to use it. The irreversible nature is mentioned, which provides some contextual guidance.

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/jaredhobbs/cronalert-mcp'

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