Skip to main content
Glama

create_task

Add a new task to a project by specifying its title and description. Include optional tool and rule recommendations to streamline task execution and ensure alignment with guidelines.

Instructions

Create a new task within an existing project. You can optionally include tool and rule recommendations to guide task completion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesA detailed description of the task.
projectIdYesThe ID of the project to add the task to (e.g., proj-1).
ruleRecommendationsNoRecommendations for relevant rules to review when completing the task.
titleYesThe title of the task.
toolRecommendationsNoRecommendations for tools to use to complete the task.

Implementation Reference

  • The main handler (ToolExecutor) for the 'create_task' tool. Validates input parameters (projectId, title, description, optional recommendations), constructs a single task object, and delegates to taskManager.addTasksToProject() to create the task.
    const createTaskToolExecutor: ToolExecutor = { name: "create_task", async execute(taskManager, args) { const projectId = validateProjectId(args.projectId); const title = validateRequiredStringParam(args.title, "title"); const description = validateRequiredStringParam(args.description, "description"); if (args.toolRecommendations !== undefined && typeof args.toolRecommendations !== "string") { throw new AppError( "Invalid type for optional parameter 'toolRecommendations' (Expected string)", AppErrorCode.InvalidArgument ); } if (args.ruleRecommendations !== undefined && typeof args.ruleRecommendations !== "string") { throw new AppError( "Invalid type for optional parameter 'ruleRecommendations' (Expected string)", AppErrorCode.InvalidArgument ); } const singleTask = { title, description, toolRecommendations: args.toolRecommendations ? String(args.toolRecommendations) : undefined, ruleRecommendations: args.ruleRecommendations ? String(args.ruleRecommendations) : undefined, }; const resultData = await taskManager.addTasksToProject(projectId, [singleTask]); return resultData; }, }; toolExecutorMap.set(createTaskToolExecutor.name, createTaskToolExecutor);
  • The Tool object definition for 'create_task', including name, description, and inputSchema for validation in MCP.
    const createTaskTool: Tool = { name: "create_task", description: "Create a new task within an existing project. You can optionally include tool and rule recommendations to guide task completion.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "The ID of the project to add the task to (e.g., proj-1).", }, title: { type: "string", description: "The title of the task.", }, description: { type: "string", description: "A detailed description of the task.", }, toolRecommendations: { type: "string", description: "Recommendations for tools to use to complete the task.", }, ruleRecommendations: { type: "string", description: "Recommendations for relevant rules to review when completing the task.", } }, required: ["projectId", "title", "description"] } };
  • Registers the createTaskToolExecutor in the toolExecutorMap used by the executeToolAndHandleErrors function.
    toolExecutorMap.set(createTaskToolExecutor.name, createTaskToolExecutor);
  • Exports ALL_TOOLS array which includes the createTaskTool, likely used for MCP tool registration.
    export const ALL_TOOLS: Tool[] = [ listProjectsTool, readProjectTool, createProjectTool, deleteProjectTool, addTasksToProjectTool, finalizeProjectTool, generateProjectPlanTool, listTasksTool, readTaskTool, createTaskTool, updateTaskTool, deleteTaskTool, approveTaskTool, getNextTaskTool, ];

Other Tools

Related 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/chriscarrollsmith/taskqueue-mcp'

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