Skip to main content
Glama
robertn702

Sunsama MCP Server

create-task

Create new tasks in Sunsama with title, notes, due dates, time estimates, and stream assignments to organize your workflow.

Instructions

Create a new task with optional properties

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dueDateNoDue date string (ISO format)
notesNoAdditional task notes
privateNoWhether the task is private
snoozeUntilNoSnooze until date string (ISO format) - the date the task is scheduled for
streamIdsNoArray of stream IDs to associate with the task
taskIdNoCustom task ID (auto-generated if not provided)
textYesTask title/description
timeEstimateNoTime estimate in minutes

Implementation Reference

  • The main handler implementation for the 'create-task' tool. It wraps withTransportClient, defines parameters via createTaskSchema, and executes task creation via the client.
    export const createTaskTool = withTransportClient({
      name: "create-task",
      description: "Create a new task with optional properties",
      parameters: createTaskSchema,
      execute: async (
        {
          text,
          notes,
          streamIds,
          timeEstimate,
          dueDate,
          snoozeUntil,
          private: isPrivate,
          taskId,
          integration,
        }: CreateTaskInput,
        context: ToolContext,
      ) => {
        const options: CreateTaskOptions = {};
        if (notes) options.notes = notes;
        if (streamIds) options.streamIds = streamIds;
        if (timeEstimate) options.timeEstimate = timeEstimate;
        if (dueDate) options.dueDate = dueDate;
        if (snoozeUntil) options.snoozeUntil = snoozeUntil;
        if (isPrivate !== undefined) options.private = isPrivate;
        if (taskId) options.taskId = taskId;
        if (integration) options.integration = integration;
    
        const result = await context.client.createTask(text, options);
    
        return formatJsonResponse({
          success: result.success,
          taskId: result.updatedFields?._id,
          title: text,
          created: true,
          updatedFields: result.updatedFields,
        });
      },
    });
  • Input schema validation for the create-task tool using Zod, defining all parameters with descriptions and constraints.
    export const createTaskSchema = z.object({
      text: z.string().min(1, "Task text is required").describe(
        "Task title/description",
      ),
      notes: z.string().optional().describe("Additional task notes"),
      streamIds: z.array(z.string()).optional().describe(
        "Array of stream IDs to associate with the task",
      ),
      timeEstimate: z.number().int().positive().optional().describe(
        "Time estimate in minutes",
      ),
      dueDate: z.string().optional().describe("Due date string (ISO format)"),
      snoozeUntil: z.string().optional().describe(
        "Snooze until date string (ISO format) - the date the task is scheduled for",
      ),
      private: z.boolean().optional().describe("Whether the task is private"),
      taskId: z.string().optional().describe(
        "Custom task ID (auto-generated if not provided)",
      ),
      integration: taskIntegrationSchema.optional().describe(
        "Integration information for linking task to external services (GitHub, Gmail, etc.)",
      ),
    });
  • src/main.ts:33-44 (registration)
    Final registration of the create-task tool (via allTools) with the MCP server using server.registerTool.
    allTools.forEach((tool) => {
      server.registerTool(
        tool.name,
        {
          description: tool.description,
          inputSchema: "shape" in tool.parameters
            ? tool.parameters.shape
            : tool.parameters,
        },
        tool.execute,
      );
    });
  • The taskTools array that includes the createTaskTool for grouping task-related tools.
    export const taskTools = [
      // Query tools
      getTasksBacklogTool,
      getTasksByDayTool,
      getArchivedTasksTool,
      getTaskByIdTool,
    
      // Lifecycle tools
      createTaskTool,
      deleteTaskTool,
    
      // Update tools
      updateTaskCompleteTool,
      updateTaskSnoozeDateTool,
      updateTaskBacklogTool,
      updateTaskPlannedTimeTool,
      updateTaskNotesTool,
      updateTaskDueDateTool,
      updateTaskTextTool,
      updateTaskStreamTool,
    ];
  • src/tools/index.ts:5-9 (registration)
    Aggregation of all tools into allTools array, spreading taskTools which includes create-task.
    export const allTools = [
      ...userTools,
      ...taskTools,
      ...streamTools,
    ];
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Create a new task' implies a write/mutation operation, but the description doesn't disclose behavioral traits like authentication requirements, rate limits, whether the task becomes immediately visible to others, or what happens on duplicate taskId. For a mutation tool with zero annotation coverage, this is insufficient disclosure.

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?

The description is a single, efficient sentence that gets straight to the point. Every word earns its place - 'Create' (action), 'new task' (resource), 'optional properties' (scope). No wasted words or unnecessary elaboration.

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?

For a mutation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after creation (e.g., returns the created task object), error conditions, or how it relates to the sibling update tools. The agent would need to guess about the tool's behavior and output format.

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%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value with 'optional properties' which is already evident from the schema's required array. No additional semantic context is provided beyond what's in the parameter descriptions.

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 verb ('Create') and resource ('new task'), making the purpose immediately understandable. It also mentions 'optional properties' which hints at customization. However, it doesn't distinguish this tool from sibling tools like 'update-task-text' or 'update-task-due-date' that also modify task properties.

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. With multiple sibling update tools (update-task-text, update-task-due-date, etc.), there's no indication whether this is for initial creation only versus using update tools for modifications. No prerequisites or contextual constraints are mentioned.

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/robertn702/mcp-sunsama'

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