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,
    ];
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the tool 'creates' something, implying a write/mutation operation, but doesn't mention any behavioral traits like permissions required, whether the creation is idempotent, error handling, or what happens if the project doesn't exist. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 core purpose ('Create a new task within an existing project') and adds optional details without redundancy. Every part earns its place by clarifying scope and features, making it easy to parse quickly. It could be slightly improved by structuring prerequisites more explicitly, but it avoids unnecessary verbosity.

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 that this is a mutation tool (creating a task) with no annotations and no output schema, the description is incomplete. It doesn't address key contextual aspects like what the tool returns (e.g., a task ID or confirmation), error conditions (e.g., invalid projectId), or side effects. The high schema coverage helps with parameters, but overall, the description lacks sufficient detail for safe and effective use in a complex environment with multiple sibling tools.

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?

Schema description coverage is 100%, meaning all parameters are documented in the input schema. The description adds minimal value by mentioning 'tool and rule recommendations' as optional features, which corresponds to the 'toolRecommendations' and 'ruleRecommendations' parameters. However, it doesn't provide additional context beyond what the schema already specifies (e.g., format examples or constraints), so it meets the baseline for high schema coverage without compensating further.

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 ('Create a new task') and the target resource ('within an existing project'), which provides a specific verb+resource combination. It also mentions optional features ('tool and rule recommendations'), adding useful detail. However, it doesn't explicitly distinguish this tool from sibling tools like 'add_tasks_to_project' or 'update_task', which could create ambiguity about when to use each.

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 'add_tasks_to_project' or 'update_task'. It mentions that tasks are created 'within an existing project', which implies a prerequisite (a project must exist), but doesn't state this explicitly or offer any context about exclusions or preferred scenarios. Without such guidance, the agent must infer usage from tool names alone.

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

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