Skip to main content
Glama

move_task

Reposition a task within a dartboard or move it to a different dartboard, with ordering by index or relative placement.

Instructions

Move/reposition a task within a dartboard or to a different dartboard. Supports ordering by index or relative to another task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dart_idYesTask dart_id (also accepts "id" or "task_id")
dartboardNoTarget dartboard (dart_id or name) - moves task to different dartboard
orderNoPosition index in dartboard (0-based)
after_idNoPlace task after this task dart_id
before_idNoPlace task before this task dart_id

Implementation Reference

  • Main handler for the move_task tool. Validates input, resolves dart_id aliases, validates dartboard if provided, then calls DartClient.moveTask and returns the result.
    export async function handleMoveTask(input: MoveTaskInput): Promise<MoveTaskOutput> {
      const DART_TOKEN = process.env.DART_TOKEN;
    
      if (!DART_TOKEN) {
        throw new DartAPIError(
          'DART_TOKEN environment variable is required. Get your token from: https://app.dartai.com/?settings=account',
          401
        );
      }
    
      // Validate input
      if (!input || typeof input !== 'object') {
        throw new ValidationError('Input must be an object', 'input');
      }
    
      // Accept id, task_id, or taskId as aliases for dart_id
      input.dart_id = resolveDartId(input as unknown as Record<string, unknown>);
    
      // At least one positioning option should be provided
      if (input.dartboard === undefined && input.order === undefined &&
          input.after_id === undefined && input.before_id === undefined) {
        throw new ValidationError(
          'At least one of dartboard, order, after_id, or before_id must be provided',
          'positioning'
        );
      }
    
      // Validate dartboard if provided
      let resolvedDartboard: string | undefined;
      if (input.dartboard !== undefined) {
        const config = await handleGetConfig({ cache_bust: false });
        const dartboard = findDartboard(config.dartboards, input.dartboard);
    
        if (!dartboard) {
          const dartboardNames = getDartboardNames(config.dartboards);
          throw new ValidationError(
            `Invalid dartboard: "${input.dartboard}" not found. Available: ${dartboardNames.slice(0, 5).join(', ')}`,
            'dartboard',
            dartboardNames
          );
        }
        resolvedDartboard = typeof dartboard === 'string' ? dartboard : dartboard.dart_id;
      }
    
      const client = new DartClient({ token: DART_TOKEN });
    
      const task = await client.moveTask({
        dart_id: input.dart_id.trim(),
        dartboard: resolvedDartboard,
        order: input.order,
        after_id: input.after_id,
        before_id: input.before_id,
      });
    
      return {
        dart_id: task.dart_id,
        dartboard: task.dartboard || resolvedDartboard || '',
        task,
        url: `https://app.dartai.com/task/${task.dart_id}`,
      };
    }
  • Input type for move_task: dart_id is required; dartboard, order, after_id, before_id are optional positioning parameters.
    export interface MoveTaskInput {
      dart_id: string;
      dartboard?: string;
      order?: number;
      after_id?: string;
      before_id?: string;
    }
  • Output type for move_task: returns dart_id, dartboard, full task object, and a URL to the task.
    export interface MoveTaskOutput {
      dart_id: string;
      dartboard: string;
      task: DartTask;
      url: string;
    }
  • src/index.ts:847-875 (registration)
    Registration of the move_task tool in the MCP server tool list with name, description, and input schema.
    {
      name: 'move_task',
      description: 'Move/reposition a task within a dartboard or to a different dartboard. Supports ordering by index or relative to another task.',
      inputSchema: {
        type: 'object',
        properties: {
          dart_id: {
            type: 'string',
            description: 'Task dart_id (also accepts "id" or "task_id")',
          },
          dartboard: {
            type: 'string',
            description: 'Target dartboard (dart_id or name) - moves task to different dartboard',
          },
          order: {
            type: 'integer',
            description: 'Position index in dartboard (0-based)',
          },
          after_id: {
            type: 'string',
            description: 'Place task after this task dart_id',
          },
          before_id: {
            type: 'string',
            description: 'Place task before this task dart_id',
          },
        },
        required: ['dart_id'],
      },
  • src/index.ts:1208-1218 (registration)
    Routing case in the main request handler that calls handleMoveTask when the tool name is 'move_task'.
    case 'move_task': {
      const result = await handleMoveTask((args || {}) as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
Behavior3/5

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

No annotations exist, so the description must cover behavioral traits. It mentions moving and ordering but does not disclose potential side effects (e.g., impact on comments, time tracking), auth needs, or error handling. This is adequate but not thorough.

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?

Two concise sentences, front-loaded with the verb and resource. Every word is purposeful, with no redundancy or filler.

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 5 parameters and no output schema, the description covers the core purpose and ordering options but lacks details on parameter conflicts, error behavior, return value, or edge cases. It is sufficient for basic use but not fully comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing solid parameter descriptions. The description adds value by explaining the ordering semantics ('by index or relative to another task'), which aids selection of order/after_id/before_id beyond the schema alone.

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 verb ('move/reposition'), resource ('task'), and scope ('within a dartboard or to a different dartboard'). It also specifies ordering options, distinguishing it from siblings like update_task.

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 repositioning tasks but lacks explicit guidance on when to use versus alternatives (e.g., update_task for property changes). No when-not or context exclusions are provided.

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/standardbeagle/dart-query'

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