Skip to main content
Glama

delete_canvas

Delete an Instant Experience (Canvas) by providing its ID. This action is permanent and irreversible.

Instructions

Delete an Instant Experience (Canvas). This action is irreversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
canvas_idYesCanvas ID to delete

Implementation Reference

  • The delete_canvas tool handler function. Calls client.delete with the canvas_id and returns success response, or catches errors.
    server.tool(
      "delete_canvas",
      "Delete an Instant Experience (Canvas). This action is irreversible.",
      {
        canvas_id: z.string().describe("Canvas ID to delete"),
      },
      async ({ canvas_id }) => {
        try {
          const { data, rateLimit } = await client.delete(`/${canvas_id}`);
          return { content: [{ type: "text" as const, text: JSON.stringify({ success: true, ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Input schema for delete_canvas: requires canvas_id (string).
    {
      canvas_id: z.string().describe("Canvas ID to delete"),
    },
  • The registerCanvasTools function is exported and registers canvas tools on the server.
    export function registerCanvasTools(server: McpServer, client: AdsClient): void {
  • src/index.ts:58-58 (registration)
    Where registerCanvasTools is called to register the tool on the MCP server.
    registerCanvasTools(server, client);
  • The client.delete method used by the handler to perform the HTTP DELETE request.
    async delete(
      path: string,
      params?: Record<string, unknown>
    ): Promise<ClientResponse> {
      return this.request("DELETE", path, params);
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.7/5.0
Behavior3/5

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

The description discloses the critical behavioral fact that deletion is irreversible, but with no annotations available, it does not cover other important aspects like permissions, side effects, or return behavior.

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, front-loaded with the action, and the irreversibility warning is concise and relevant. No wasted words.

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

Completeness3/5

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

For a simple delete tool with one parameter, the description covers the action and key warning, but lacks details on return values or prerequisites, and there is no output schema or annotations to fill the gaps.

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?

The input schema already documents the canvas_id parameter with a description, and the tool description does not add any additional parameter-level information. Since schema coverage is 100%, the baseline score of 3 applies.

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 action (delete) and the specific resource (Instant Experience/Canvas), which distinguishes it from sibling tools like get_canvas and create_canvas.

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

Usage Guidelines3/5

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

The description implies usage for deletion but does not provide explicit guidance on when to use this tool vs alternatives, nor any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools