Skip to main content
Glama
its-dart

Dart MCP Server

by its-dart

delete_task

Move a specific task to the trash by its unique 12-character ID, allowing recovery if needed, without altering any other task details.

Instructions

Move an existing task to the trash, where it can be recovered if needed. Nothing else about the task will be changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe 12-character alphanumeric ID of the task

Implementation Reference

  • The handler logic for the 'delete_task' tool within the CallToolRequestSchema switch statement. It validates the input 'id' using getIdValidated, calls TaskService.deleteTask(id), and returns the result as a JSON string.
    case DELETE_TASK_TOOL.name: {
      const id = getIdValidated(args.id);
      const task = await TaskService.deleteTask(id);
      return {
        content: [{ type: "text", text: JSON.stringify(task, null, 2) }],
      };
    }
  • The Tool object definition for 'delete_task', including name, description, and inputSchema requiring a task 'id' with 12-character alphanumeric pattern.
    export const DELETE_TASK_TOOL: Tool = {
      name: "delete_task",
      description:
        "Move an existing task to the trash, where it can be recovered if needed. Nothing else about the task will be changed.",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "The 12-character alphanumeric ID of the task",
            pattern: "^[a-zA-Z0-9]{12}$",
          },
        },
        required: ["id"],
      },
    };
  • index.ts:192-214 (registration)
    The 'TOOLS' array registers the DELETE_TASK_TOOL along with other tools, which is returned by the ListToolsRequestSchema handler.
    const TOOLS = [
      // Config
      GET_CONFIG_TOOL,
      // Tasks
      CREATE_TASK_TOOL,
      LIST_TASKS_TOOL,
      GET_TASK_TOOL,
      UPDATE_TASK_TOOL,
      DELETE_TASK_TOOL,
      // Docs
      CREATE_DOC_TOOL,
      LIST_DOCS_TOOL,
      GET_DOC_TOOL,
      UPDATE_DOC_TOOL,
      DELETE_DOC_TOOL,
      // Comments
      ADD_TASK_COMMENT_TOOL,
      LIST_TASK_COMMENTS_TOOL,
      // Other
      GET_DARTBOARD_TOOL,
      GET_FOLDER_TOOL,
      GET_VIEW_TOOL,
    ];
  • Helper function 'getIdValidated' used in the delete_task handler to validate the task ID matches the 12-character alphanumeric pattern.
    const getIdValidated = (strMaybe: any, name: string = "ID"): string => {
      if (typeof strMaybe !== "string" && !(strMaybe instanceof String)) {
        throw new Error(`${name} must be a string`);
      }
      const id = strMaybe.toString();
      if (!ID_REGEX.test(id)) {
        throw new Error(`${name} must be 12 alphanumeric characters`);
      }
      return id;
    };
  • index.ts:36-52 (registration)
    Import of DELETE_TASK_TOOL from './tools.js' enabling its use in the server.
      ADD_TASK_COMMENT_TOOL,
      CREATE_DOC_TOOL,
      CREATE_TASK_TOOL,
      DELETE_DOC_TOOL,
      DELETE_TASK_TOOL,
      GET_CONFIG_TOOL,
      GET_DARTBOARD_TOOL,
      GET_DOC_TOOL,
      GET_FOLDER_TOOL,
      GET_TASK_TOOL,
      GET_VIEW_TOOL,
      LIST_DOCS_TOOL,
      LIST_TASK_COMMENTS_TOOL,
      LIST_TASKS_TOOL,
      UPDATE_DOC_TOOL,
      UPDATE_TASK_TOOL,
    } from "./tools.js";
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a destructive operation (moving to trash), reversible (can be recovered), and idempotent (nothing else changes). It doesn't cover error conditions or permissions, but for a simple delete tool, this is reasonably comprehensive.

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?

The description is two concise sentences with zero waste: the first states the core action and recovery option, the second clarifies side effects. It's front-loaded with the primary purpose and appropriately sized for a single-parameter tool.

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?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is nearly complete. It covers purpose, behavior, and recovery, though it lacks details on error responses or confirmation prompts. For a basic deletion tool, this is sufficient but not exhaustive.

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%, so the schema already fully documents the single 'id' parameter. The description doesn't add any parameter-specific details beyond what the schema provides, such as example IDs or context about task identification. This meets the baseline for high schema coverage.

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 ('Move to the trash') and resource ('existing task'), distinguishing it from siblings like delete_doc (which deletes documents) and update_task (which modifies tasks). It precisely communicates what the tool does without being vague or tautological.

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 by specifying 'existing task' and mentioning recovery, suggesting it's for soft deletion rather than permanent removal. However, it doesn't explicitly state when to use this vs. alternatives like update_task for status changes or delete_doc for document deletion, leaving some ambiguity in sibling tool selection.

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

Related 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/its-dart/dart-mcp-server'

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