Skip to main content
Glama

asana_set_parent_for_task

Set a task's parent and position it within subtasks to organize project hierarchies in Asana.

Instructions

Set the parent of a task and position the subtask within the other subtasks of that parent

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
task_idYesThe task ID to operate on
optsNo

Implementation Reference

  • Handler logic for executing the 'asana_set_parent_for_task' tool, which handles argument parsing and delegates to the Asana client wrapper.
    case "asana_set_parent_for_task": {
      let { data, task_id, opts } = args;
      if (typeof data == "string") {
        data = JSON.parse(data);
      }
      if (typeof opts == "string") {
        opts = JSON.parse(opts);
      }
      const response = await asanaClient.setParentForTask(data, task_id, opts);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Schema definition including name, description, and input schema for the 'asana_set_parent_for_task' tool.
    export const setParentForTaskTool: Tool = {
      name: "asana_set_parent_for_task",
      description: "Set the parent of a task and position the subtask within the other subtasks of that parent",
      inputSchema: {
        type: "object",
        properties: {
          data: {
            parent: {
              type: "string",
              description: "The GID of the new parent of the task, or null for no parent",
              required: true
            },
            insert_after: {
              type: "string",
              description: "A subtask of the parent to insert the task after, or null to insert at the beginning of the list. Cannot be used with insert_before. The task must already be set as a subtask of that parent."
            },
            insert_before: {
              type: "string",
              description: "A subtask of the parent to insert the task before, or null to insert at the end of the list. Cannot be used with insert_after. The task must already be set as a subtask of that parent."
            },
          },
          task_id: {
            type: "string",
            description: "The task ID to operate on"
          },
          opts: {
            opt_fields: {
              type: "string",
              description: "Comma-separated list of optional fields to include"
            }
          }
        },
        required: ["task_id", "data"]
      }
    };
  • The setParentForTaskTool is included in the all_tools array, which is used to generate the list_of_tools for MCP tool registration.
    setParentForTaskTool,
  • Import of the setParentForTaskTool schema required for tool registration.
      addTaskDependenciesTool,
      addTaskDependentsTool,
      setParentForTaskTool
    } from './tools/task-relationship-tools.js';
  • Helper method in AsanaClientWrapper that wraps the underlying Asana API call for setting a task's parent.
    async setParentForTask(data: any, taskId: string, opts: any = {}) {
      const response = await this.tasks.setParentForTask({ data }, taskId, opts);
      return response.data;
    }
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. It mentions that the task is positioned 'within the other subtasks of that parent', hinting at ordering behavior, but lacks critical details: it doesn't specify if this is a mutating operation (implied by 'Set'), what permissions are required, potential side effects (e.g., impact on dependencies), error conditions, or response format. For a tool that modifies task relationships, this is insufficient.

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 a single, efficient sentence that front-loads the main action ('Set the parent of a task') and adds positioning detail. It avoids redundancy and is appropriately sized for the tool's complexity, though it could be slightly more structured (e.g., separating purpose from constraints).

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 complexity of a mutating tool with no annotations, low schema coverage (33%), and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or error handling, and parameter semantics are largely undocumented. For a tool that changes task hierarchy, more context is needed to ensure safe and correct usage.

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

Parameters2/5

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

Schema description coverage is low (33%), with only 'parent' parameter documented in the schema. The description adds minimal value beyond the schema: it implies parameters for parent setting and positioning but doesn't explain the semantics of 'insert_after' or 'insert_before', their mutual exclusivity, or the 'opts' parameter. It fails to compensate for the poor schema coverage, leaving most parameters unclear.

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 ('Set the parent of a task') and the resource ('task'), making the purpose understandable. It also mentions positioning the subtask, which adds specificity. However, it doesn't explicitly differentiate this tool from sibling tools like 'asana_update_task' or 'asana_create_subtask', which might also involve task hierarchy modifications.

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. It doesn't mention prerequisites (e.g., the task must exist), compare it to siblings like 'asana_update_task' for general updates or 'asana_create_subtask' for creating new subtasks, or specify scenarios where setting a parent is appropriate versus other operations.

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/roychri/mcp-server-asana'

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