Skip to main content
Glama

subtask_create

Add checklist items to tasks in Saga MCP's project tracker. Create single or multiple subtasks to organize work and track progress within structured projects.

Instructions

Create one or more subtasks (checklist items) for a task. Accepts a single title string or an array of title strings for batch creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesParent task ID
titlesYes

Implementation Reference

  • The handler function `handleSubtaskCreate` executes the logic for creating subtasks in the database.
    function handleSubtaskCreate(args: Record<string, unknown>) {
      const db = getDb();
      const taskId = args.task_id as number;
      const rawTitles = args.titles;
      const titles = Array.isArray(rawTitles) ? rawTitles as string[] : [rawTitles as string];
    
      const stmt = db.prepare(
        'INSERT INTO subtasks (task_id, title) VALUES (?, ?) RETURNING *'
      );
    
      const created = db.transaction(() => {
        return titles.map((title) => {
          const subtask = stmt.get(taskId, title) as Record<string, unknown>;
          logActivity(db, 'subtask', subtask.id as number, 'created', null, null, null, `Subtask '${title}' created`);
          return subtask;
        });
      })();
    
      return created.length === 1 ? created[0] : created;
    }
  • The tool definition for `subtask_create` including its input schema and description.
    export const definitions: Tool[] = [
      {
        name: 'subtask_create',
        description:
          'Create one or more subtasks (checklist items) for a task. Accepts a single title string or an array of title strings for batch creation.',
        annotations: { title: 'Create Subtask(s)', readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
        inputSchema: {
          type: 'object',
          properties: {
            task_id: { type: 'integer', description: 'Parent task ID' },
            titles: {
              oneOf: [
                { type: 'string', description: 'Single subtask title' },
                { type: 'array', items: { type: 'string' }, description: 'Multiple subtask titles' },
              ],
            },
          },
          required: ['task_id', 'titles'],
        },
      },
  • The `handlers` object maps the tool name `subtask_create` to its implementation function `handleSubtaskCreate`.
    export const handlers: Record<string, ToolHandler> = {
      subtask_create: handleSubtaskCreate,
      subtask_update: handleSubtaskUpdate,
      subtask_delete: handleSubtaskDelete,
    };
Behavior3/5

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

Annotations already indicate this is a non-readOnly, non-destructive, non-idempotent creation operation. The description adds useful context about batch creation capability (single string or array), but doesn't disclose important behavioral details like whether creation requires specific permissions, what happens on duplicate titles, or how the system responds to invalid task_ids.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in two sentences that convey the core functionality and parameter flexibility. The first sentence states the purpose, the second explains the parameter behavior. No wasted words, though it could be slightly more front-loaded with key constraints.

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 creation tool with no output schema and only basic annotations, the description is minimally adequate. It covers what the tool does and parameter flexibility, but lacks important context about prerequisites (valid task_id), error conditions, response format, and differentiation from sibling creation tools.

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 50% schema description coverage (only task_id has a description), the description compensates by explaining that 'titles' accepts either a single string or array of strings for batch creation. However, it doesn't provide semantic context for task_id beyond what the schema already states ('Parent task ID'), nor does it explain title formatting requirements or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create one or more subtasks') and resource ('checklist items for a task'), distinguishing it from siblings like subtask_delete or subtask_update. However, it doesn't explicitly differentiate from task_create or other creation tools beyond specifying the subtask context.

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 like subtask_update for modifying existing subtasks or task_create for creating parent tasks. It mentions batch creation capability but doesn't explain when batch vs single creation is appropriate.

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