Skip to main content
Glama

update_task

Modify existing task details including status, title, description, and priority in the Dart MCP Server's task management system.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
duidYesDUID of the task to update
status_duidNoNew status DUID
titleNoNew title for the task
descriptionNoNew description for the task
priorityNoNew priority for the task

Implementation Reference

  • Handler for 'update_task' tool call. Constructs and executes a Python script that creates a TaskUpdate object with the provided parameters (duid required, others optional), wraps it in an UPDATE Operation for TASK model, and submits via client.transact with TASK_UPDATE transaction kind.
                        case 'update_task': {
                            console.error('[Debug] Handling update_task request');
                            const command = `print("[Debug] Starting task update", file=sys.stderr)
    
    try:
        # Get initialized client and bundle
        client, bundle, dartboard_duid = initialize()
        print("[Debug] Got client and bundle", file=sys.stderr)
    
        print("[Debug] Creating task update object", file=sys.stderr)
        task_update = TaskUpdate(
            duid="${args.duid}",
            source_type=UNSET
        )
        
        if ${args.status_duid !== undefined ? 'True' : 'False'}:
            task_update.status_duid = "${args.status_duid}"
        if ${args.title !== undefined ? 'True' : 'False'}:
            task_update.title = "${args.title}"
        if ${args.description !== undefined ? 'True' : 'False'}:
            task_update.description = "${args.description}"
        if ${args.priority !== undefined ? 'True' : 'False'}:
            task_update.priority = "${args.priority}"
        
        print("[Debug] Task update object created:", task_update, file=sys.stderr)
    
        print("[Debug] Creating operation", file=sys.stderr)
        task_update_op = Operation(
            model=OperationModelKind.TASK,
            kind=OperationKind.UPDATE,
            data=task_update
        )
        print("[Debug] Operation created:", task_update_op, file=sys.stderr)
    
        print("[Debug] Executing transaction", file=sys.stderr)
        response = client.transact([task_update_op], TransactionKind.TASK_UPDATE)
        print("[Debug] Transaction completed", file=sys.stderr)
        
        if response.results and response.results[0].success:
            print(f"Task updated successfully")
            print(f"[Debug] Task update successful", file=sys.stderr)
        else:
            print("[Debug] Task update failed", file=sys.stderr)
            if response.results:
                print(f"[Debug] Result: {response.results[0]}", file=sys.stderr)
            print("Failed to update task", file=sys.stderr)
            sys.exit(1)
    except Exception as e:
        print(f"[Debug] Task update error: {str(e)}", file=sys.stderr)
        print("[Debug] Error type:", type(e), file=sys.stderr)
        traceback.print_exc(file=sys.stderr)
        sys.exit(1)`;
    
                            console.error('[Debug] Running Python command for task update');
                            const output = await this.runDartCommand(command);
                            console.error('[Debug] Task update output:', output);
                            const response = {
                                content: [{
                                    type: 'text',
                                    text: output,
                                }],
                            };
                            console.error('[Debug] Sending task update response:', JSON.stringify(response, null, 2));
                            return response;
                        }
  • JSON schema defining the input parameters for the update_task tool. Requires 'duid' of the task to update; optional fields include status_duid, title, description, and priority.
        name: 'update_task',
        description: 'Update an existing task',
        inputSchema: {
            type: 'object',
            properties: {
                duid: {
                    type: 'string',
                    description: 'DUID of the task to update',
                },
                status_duid: {
                    type: 'string',
                    description: 'New status DUID',
                },
                title: {
                    type: 'string',
                    description: 'New title for the task',
                },
                description: {
                    type: 'string',
                    description: 'New description for the task',
                },
                priority: {
                    type: 'string',
                    description: 'New priority for the task',
                    enum: ['Low', 'Medium', 'High', 'Critical'],
                }
            },
            required: ['duid'],
        },
    },
  • src/index.ts:232-512 (registration)
    The update_task tool is registered by including it in the tools array returned by the ListToolsRequestSchema handler.
    const tools = [
        {
            name: 'get_default_status',
            description: 'Get the default status DUIDs',
            inputSchema: {
                type: 'object',
                properties: {},
                required: [],
            },
        },
        {
            name: 'get_default_space',
            description: 'Get the default space DUID',
            inputSchema: {
                type: 'object',
                properties: {},
                required: [],
            },
        },
        {
            name: 'create_task',
            description: 'Create a new Dart task',
            inputSchema: {
                type: 'object',
                properties: {
                    title: {
                        type: 'string',
                        description: 'Title of the task',
                    },
                    description: {
                        type: 'string',
                        description: 'Description of the task',
                    },
                    priority: {
                        type: 'string',
                        description: 'Priority of the task',
                        enum: ['Low', 'Medium', 'High', 'Critical'],
                    },
                    tags: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                        description: 'Tags for the task',
                    },
                    size: {
                        type: 'number',
                        description: 'Size/complexity of the task (1-5)',
                        minimum: 1,
                        maximum: 5,
                    },
                    assignee_duids: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                        description: 'List of assignee DUIDs',
                    },
                    subscriber_duids: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                        description: 'List of subscriber DUIDs',
                    }
                },
                required: ['title', 'description'],
            },
        },
        {
            name: 'update_task',
            description: 'Update an existing task',
            inputSchema: {
                type: 'object',
                properties: {
                    duid: {
                        type: 'string',
                        description: 'DUID of the task to update',
                    },
                    status_duid: {
                        type: 'string',
                        description: 'New status DUID',
                    },
                    title: {
                        type: 'string',
                        description: 'New title for the task',
                    },
                    description: {
                        type: 'string',
                        description: 'New description for the task',
                    },
                    priority: {
                        type: 'string',
                        description: 'New priority for the task',
                        enum: ['Low', 'Medium', 'High', 'Critical'],
                    }
                },
                required: ['duid'],
            },
        },
        {
            name: 'get_dartboards',
            description: 'Get available dartboards',
            inputSchema: {
                type: 'object',
                properties: {
                    space_duid: {
                        type: 'string',
                        description: 'Space DUID to get dartboards from',
                    }
                },
                required: ['space_duid'],
            },
        },
        {
            name: 'get_folders',
            description: 'Get available folders',
            inputSchema: {
                type: 'object',
                properties: {
                    space_duid: {
                        type: 'string',
                        description: 'Space DUID to get folders from',
                    }
                },
                required: ['space_duid'],
            },
        },
        {
            name: 'create_folder',
            description: 'Create a new folder in a space',
            inputSchema: {
                type: 'object',
                properties: {
                    space_duid: {
                        type: 'string',
                        description: 'Space DUID to create the folder in',
                    },
                    title: {
                        type: 'string',
                        description: 'Title of the folder',
                    },
                    description: {
                        type: 'string',
                        description: 'Description of the folder',
                    },
                    kind: {
                        type: 'string',
                        description: 'Kind of folder',
                        enum: ['Default', 'Reports', 'Other'],
                        default: 'Default'
                    }
                },
                required: ['space_duid', 'title'],
            },
        },
        {
            name: 'create_doc',
            description: 'Create a new document or report',
            inputSchema: {
                type: 'object',
                properties: {
                    folder_duid: {
                        type: 'string',
                        description: 'Folder DUID to create the document in',
                    },
                    title: {
                        type: 'string',
                        description: 'Title of the document',
                    },
                    text: {
                        type: 'string',
                        description: 'Content of the document',
                    },
                    text_markdown: {
                        type: 'string',
                        description: 'Markdown content of the document',
                    },
                    report_kind: {
                        type: 'string',
                        description: 'Kind of report (if creating a report)',
                        enum: ['Changelog', 'Standup'],
                    },
                    editor_duids: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                        description: 'List of editor DUIDs',
                    },
                    subscriber_duids: {
                        type: 'array',
                        items: {
                            type: 'string',
                        },
                        description: 'List of subscriber DUIDs',
                    }
                },
                required: ['folder_duid', 'title'],
            },
        },
        {
            name: 'create_space',
            description: 'Create a new space',
            inputSchema: {
                type: 'object',
                properties: {
                    title: {
                        type: 'string',
                        description: 'Title of the space'
                    },
                    description: {
                        type: 'string',
                        description: 'Description of the space'
                    },
                    abrev: {
                        type: 'string',
                        description: 'Short abbreviation for the space'
                    },
                    accessible_by_team: {
                        type: 'boolean',
                        description: 'Whether the space is accessible by the whole team',
                        default: true
                    },
                    accessible_by_user_duids: {
                        type: 'array',
                        items: {
                            type: 'string'
                        },
                        description: 'List of user DUIDs who can access the space'
                    },
                    icon_kind: {
                        type: 'string',
                        enum: ['None', 'Icon', 'Emoji'],
                        description: 'Kind of icon to use',
                        default: 'None'
                    },
                    icon_name_or_emoji: {
                        type: 'string',
                        description: 'Icon name or emoji character'
                    },
                    color_hex: {
                        type: 'string',
                        description: 'Color in hex format (e.g. #FF0000)'
                    },
                    sprint_mode: {
                        type: 'string',
                        enum: ['None', 'ANBA'],
                        description: 'Sprint mode for the space',
                        default: 'None'
                    },
                    sprint_replicate_on_rollover: {
                        type: 'boolean',
                        description: 'Whether to replicate sprints on rollover',
                        default: false
                    },
                    sprint_name_fmt: {
                        type: 'string',
                        description: 'Sprint name format'
                    }
                },
                required: ['title']
            }
        },
        {
            name: 'delete_space',
            description: 'Delete a space and all its contents',
            inputSchema: {
                type: 'object',
                properties: {
                    space_duid: {
                        type: 'string',
                        description: 'DUID of the space to delete'
                    }
                },
                required: ['space_duid']
            }
        }
    ];
    console.error('[Debug] Sending tools response:', JSON.stringify(tools, null, 2));
    return { tools };
  • Helper method used by all tools including update_task to execute the dynamically generated Python code via child_process.spawn of a Python interpreter.
        async runDartCommand(args) {
            return new Promise((resolve, reject) => {
                // Use pyenv Python
                const pythonPath = '/Users/speed/.pyenv/shims/python';
                console.error('[Debug] Running Python command with:', pythonPath);
                
                const command = `import sys
    import os
    import traceback
    import json
    from dart import Dart, Operation, OperationKind, OperationModelKind, TaskCreate, TaskUpdate, TransactionKind, TaskSourceType, SpaceCreate
    from dart.generated.types import UNSET
    from dart.dart import _Session, UserBundle, _make_duid
    from dart.generated.models.icon_kind import IconKind
    from dart.generated.models.sprint_mode import SprintMode
    from dart.generated.models.validation_error_response import ValidationErrorResponse
    
    def initialize():
        print("[Debug] Starting Python execution", file=sys.stderr)
        print("[Debug] Current directory:", os.getcwd(), file=sys.stderr)
        print("[Debug] PYTHONPATH:", os.environ.get('PYTHONPATH'), file=sys.stderr)
        print("[Debug] DART_TOKEN:", os.environ.get('DART_TOKEN'), file=sys.stderr)
        
        session = _Session()
        print("[Debug] Session created", file=sys.stderr)
        bundle = UserBundle(session)
        print("[Debug] UserBundle created", file=sys.stderr)
        dartboard_duid = bundle.default_dartboard["duid"]
        print(f"[Debug] Got dartboard DUID: {dartboard_duid}", file=sys.stderr)
        client = Dart()
        print("[Debug] Dart client created", file=sys.stderr)
        
        return client, bundle, dartboard_duid
    
    def run_command(client, bundle, dartboard_duid):
        ${args}
    
    def main():
        client, bundle, dartboard_duid = initialize()
        run_command(client, bundle, dartboard_duid)
    
    try:
        main()
    except Exception as e:
        print(f"Error: {str(e)}", file=sys.stderr)
        traceback.print_exc(file=sys.stderr)
        sys.exit(1)`;
                
                console.error('[Debug] Python command:', command);
    
                // Create a clean environment without virtual env variables
                const env = { ...process.env };
                delete env.VIRTUAL_ENV;
                delete env.CONDA_PREFIX;
                delete env.CONDA_DEFAULT_ENV;
                delete env.CONDA_PYTHON_EXE;
    
                const childProcess = spawn(pythonPath, ['-c', command], {
                    env: {
                        ...env,
                        PYTHONUNBUFFERED: '1',
                        PYTHONPATH: process.env.PYTHONPATH || process.cwd(),
                        DART_TOKEN: process.env.DART_TOKEN,
                    },
                    stdio: ['pipe', 'pipe', 'pipe'],
                });
    
                let output = '';
                let errorOutput = '';
    
                childProcess.stdout?.on('data', (data) => {
                    const str = data.toString();
                    console.error('[Debug] Python stdout:', str);
                    output += str;
                });
    
                childProcess.stderr?.on('data', (data) => {
                    const str = data.toString();
                    console.error('[Debug] Python stderr:', str);
                    errorOutput += str;
                });
    
                childProcess.on('error', (error) => {
                    console.error('[Debug] Python process error:', error);
                    reject(new Error(`Failed to start Python process: ${error.message}`));
                });
    
                // Add timeout
                const timeout = setTimeout(() => {
                    console.error('[Debug] Python command timed out');
                    childProcess.kill();
                    reject(new Error('Command timed out'));
                }, 30000); // 30 second timeout
    
                childProcess.on('close', (code) => {
                    clearTimeout(timeout);
                    console.error(`[Debug] Python process exited with code ${code}`);
                    if (code === 0) {
                        resolve(output.trim());
                    } else {
                        reject(new Error(errorOutput || `Command failed with exit code ${code}`));
                    }
                });
            });
        }
Behavior2/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. 'Update an existing task' implies a mutation operation but doesn't specify permissions needed, whether changes are reversible, error handling, or response format. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 with no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

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

Completeness2/5

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

Given the tool's complexity (a mutation operation with 5 parameters), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't address behavioral aspects like side effects, error conditions, or return values, leaving critical gaps for the agent to understand the tool fully.

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 has 100% description coverage, documenting all 5 parameters clearly with descriptions and an enum for 'priority'. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline score of 3 for high schema coverage.

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

Purpose3/5

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

The description 'Update an existing task' clearly states the verb ('update') and resource ('task'), making the basic purpose understandable. However, it doesn't differentiate from potential sibling tools like 'create_task' or provide any specificity about what aspects of a task can be updated, making it somewhat vague.

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 'create_task' or other update-related tools that might exist. There's no mention of prerequisites, context, or exclusions, leaving the agent with minimal usage direction.

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

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