Skip to main content
Glama
its-dart

Dart MCP Server

by its-dart

delete_doc

Move a doc to the trash using its unique ID with the Dart MCP Server, allowing for potential recovery while preserving doc details unchanged.

Instructions

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

Input Schema

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

Implementation Reference

  • The handler function for the 'delete_doc' tool. It validates the provided doc ID using getIdValidated, calls DocService.deleteDoc(id) to perform the deletion (moving to trash), and returns the result as JSON.
    case DELETE_DOC_TOOL.name: {
      const id = getIdValidated(args.id);
      const doc = await DocService.deleteDoc(id);
      return {
        content: [{ type: "text", text: JSON.stringify(doc, null, 2) }],
      };
    }
  • Input schema and metadata definition for the 'delete_doc' tool, specifying the required 'id' parameter with validation pattern.
    export const DELETE_DOC_TOOL: Tool = {
      name: "delete_doc",
      description:
        "Move an existing doc to the trash, where it can be recovered if needed. Nothing else about the doc will be changed.",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "The 12-character alphanumeric ID of the doc",
            pattern: "^[a-zA-Z0-9]{12}$",
          },
        },
        required: ["id"],
      },
    };
  • index.ts:192-214 (registration)
    Registration of all tools including DELETE_DOC_TOOL (at line 206) in the TOOLS array, used by ListToolsRequestHandler to expose the tool.
    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,
    ];
  • index.ts:36-52 (registration)
    Import of DELETE_DOC_TOOL (line 39) from tools.ts into index.ts for use in handlers and registration.
      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";
  • Helper function getIdValidated used in the delete_doc handler to validate the 12-character alphanumeric doc ID.
    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;
    };
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: the action is reversible ('can be recovered'), non-destructive to doc content ('Nothing else about the doc will be changed'), and specifies the outcome (moved to trash). However, it lacks details on permissions, error conditions, or confirmation prompts.

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 sentences with zero waste: the first states the core action and recoverability, the second clarifies side effects. It is front-loaded with essential information 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 moderate complexity (mutation with recovery), no annotations, and no output schema, the description is largely complete: it covers purpose, behavior, and limitations. However, it omits details like return values or error handling, which would be beneficial for full contextual understanding.

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 documents the 'id' parameter's format and requirement. The description adds no additional parameter semantics beyond what the schema provides, such as examples or contextual meaning, meeting 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 ('an existing doc'), distinguishing it from siblings like 'delete_task' (different resource) and 'update_doc' (different action). It precisely defines 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 for moving docs to trash rather than permanent deletion, but does not explicitly state when to use this tool versus alternatives like 'update_doc' or 'delete_task'. No guidance is provided on prerequisites or exclusions, leaving usage context partially inferred.

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