Skip to main content
Glama
by cristip73

asana_create_subtask

Create a new subtask for an existing Asana task to break down complex work into manageable steps, track progress, and organize project details effectively.

Instructions

Create a new subtask for an existing task

Input Schema

NameRequiredDescriptionDefault
parent_task_idYesThe parent task ID to create the subtask under
nameYesName of the subtask
notesNoDescription of the subtask
due_onNoDue date in YYYY-MM-DD format
assigneeNoAssignee (can be 'me' or a user ID)
opt_fieldsNoComma-separated list of optional fields to include

Input Schema (JSON Schema)

{ "properties": { "assignee": { "description": "Assignee (can be 'me' or a user ID)", "type": "string" }, "due_on": { "description": "Due date in YYYY-MM-DD format", "type": "string" }, "name": { "description": "Name of the subtask", "type": "string" }, "notes": { "description": "Description of the subtask", "type": "string" }, "opt_fields": { "description": "Comma-separated list of optional fields to include", "type": "string" }, "parent_task_id": { "description": "The parent task ID to create the subtask under", "type": "string" } }, "required": [ "parent_task_id", "name" ], "type": "object" }

Implementation Reference

  • Handler case in tool_handler switch that executes asana_create_subtask by calling AsanaClientWrapper.createSubtask
    case "asana_create_subtask": { const { parent_task_id, opt_fields, ...taskData } = args; const response = await asanaClient.createSubtask(parent_task_id, taskData, { opt_fields }); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
  • Input schema and metadata definition for the asana_create_subtask tool
    export const createSubtaskTool: Tool = { name: "asana_create_subtask", description: "Create a new subtask for an existing task", inputSchema: { type: "object", properties: { parent_task_id: { type: "string", description: "The parent task ID to create the subtask under" }, name: { type: "string", description: "Name of the subtask" }, notes: { type: "string", description: "Description of the subtask" }, due_on: { type: "string", description: "Due date in YYYY-MM-DD format" }, assignee: { type: "string", description: "Assignee (can be 'me' or a user ID)" }, opt_fields: { type: "string", description: "Comma-separated list of optional fields to include" } }, required: ["parent_task_id", "name"] } };
  • Core helper method in AsanaClientWrapper that performs the actual Asana API call to create a subtask
    async createSubtask(parentTaskId: string, data: any, opts: any = {}) { const taskData = { data: { ...data, // Asigură-te că subtask-ul este adăugat la sfârșitul listei insert_before: null } }; const response = await this.tasks.createSubtaskForTask(taskData, parentTaskId, opts); return response.data; }
  • Registration of asana_create_subtask (as createSubtaskTool) in the exported tools array used by MCP server
    createTaskTool, updateTaskTool, createSubtaskTool, getMultipleTasksByGidTool, addTaskToSectionTool,
  • src/index.ts:52-58 (registration)
    MCP server registration of the tool_handler and list_of_tools containing asana_create_subtask
    server.setRequestHandler(ListToolsRequestSchema, async () => { console.error("Received ListToolsRequest"); return { tools: list_of_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/cristip73/mcp-server-asana'

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