Skip to main content
Glama

subtask_delete

DestructiveIdempotent

Remove subtasks from project tracking by specifying IDs. Use this tool to delete single or multiple subtasks in Saga MCP's structured database.

Instructions

Delete one or more subtasks. Accepts a single ID or array of IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes

Implementation Reference

  • The implementation of the subtask_delete tool handler.
    function handleSubtaskDelete(args: Record<string, unknown>) {
      const db = getDb();
      const rawIds = args.ids;
      const ids = Array.isArray(rawIds) ? rawIds as number[] : [rawIds as number];
    
      const getStmt = db.prepare('SELECT * FROM subtasks WHERE id = ?');
      const delStmt = db.prepare('DELETE FROM subtasks WHERE id = ?');
    
      const deleted = db.transaction(() => {
        return ids.map((id) => {
          const row = getStmt.get(id) as Record<string, unknown> | undefined;
          if (!row) throw new Error(`Subtask ${id} not found`);
          delStmt.run(id);
          logActivity(db, 'subtask', id, 'deleted', null, null, null, `Subtask '${row.title}' deleted`);
          return { id, title: row.title, deleted: true };
        });
      })();
    
      return deleted.length === 1 ? deleted[0] : deleted;
    }
  • The schema definition for the subtask_delete tool.
      name: 'subtask_delete',
      description: 'Delete one or more subtasks. Accepts a single ID or array of IDs.',
      annotations: { title: 'Delete Subtask(s)', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
      inputSchema: {
        type: 'object',
        properties: {
          ids: {
            oneOf: [
              { type: 'integer', description: 'Single subtask ID' },
              { type: 'array', items: { type: 'integer' }, description: 'Multiple subtask IDs' },
            ],
          },
        },
        required: ['ids'],
      },
    },
  • Tool handler registration for subtask_delete.
    export const handlers: Record<string, ToolHandler> = {
      subtask_create: handleSubtaskCreate,
      subtask_update: handleSubtaskUpdate,
      subtask_delete: handleSubtaskDelete,
Behavior4/5

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

Annotations indicate destructiveHint=true and idempotentHint=true, which the description does not contradict. It adds value by clarifying the parameter format (single ID or array) and the scope of deletion, though it omits details like error handling or confirmation prompts that could enhance behavioral understanding.

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 a single, efficient sentence that front-loads the core action ('Delete one or more subtasks') and follows with essential parameter details. Every word contributes to understanding without redundancy or fluff, making it highly concise and well-structured.

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?

Given the destructive nature (annotations cover this) and lack of output schema, the description adequately explains the basic operation but misses contextual details like expected outcomes, error scenarios, or integration with sibling tools. It's minimal but functional for a deletion tool with good annotations.

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 0% schema description coverage, the schema only defines the structure of 'ids' without semantic context. The description compensates by explaining that 'ids' can be a single integer or an array of integers for deleting subtasks, adding meaning beyond the bare schema, but it does not detail ID sourcing or validation.

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 resource ('one or more subtasks'), distinguishing it from sibling tools like subtask_create and subtask_update. It specifies the scope of deletion (single or multiple) and the parameter format (ID or array of IDs), making the purpose explicit and differentiated.

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?

The description provides no guidance on when to use this tool versus alternatives, such as note_delete or task_batch_update, nor does it mention prerequisites like required permissions or dependencies. It lacks context for selection among deletion-related tools in the sibling set.

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/spranab/saga-mcp'

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