Skip to main content
Glama
robertn702

Sunsama MCP Server

update-task-stream

Change which stream or channel a task is assigned to in Sunsama. Use this tool to reorganize tasks by moving them between different project streams.

Instructions

Update the stream/channel assignment for a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitResponsePayloadNoWhether to limit the response payload size
streamIdYesStream ID to assign to the task
taskIdYesThe ID of the task to update stream assignment for

Implementation Reference

  • The main handler/execute function for the 'update-task-stream' tool. It calls the Sunsama client to update the task's stream assignment and formats the JSON response.
    export const updateTaskStreamTool = withTransportClient({
      name: "update-task-stream",
      description: "Update the stream/channel assignment for a task",
      parameters: updateTaskStreamSchema,
      execute: async (
        { taskId, streamId, limitResponsePayload }: UpdateTaskStreamInput,
        context: ToolContext,
      ) => {
        const result = await context.client.updateTaskStream(
          taskId,
          streamId,
          limitResponsePayload !== undefined ? limitResponsePayload : true,
        );
    
        return formatJsonResponse({
          success: result.success,
          taskId,
          streamId,
          streamUpdated: true,
          updatedFields: result.updatedFields,
        });
      },
    });
  • Zod schema defining the input parameters (taskId, streamId, optional limitResponsePayload) for the update-task-stream tool.
    export const updateTaskStreamSchema = z.object({
      taskId: z.string().min(1, "Task ID is required").describe(
        "The ID of the task to update stream assignment for",
      ),
      streamId: z.string().min(1, "Stream ID is required").describe(
        "Stream ID to assign to the task",
      ),
      limitResponsePayload: z.boolean().optional().describe(
        "Whether to limit the response payload size",
      ),
    });
  • src/main.ts:33-44 (registration)
    MCP server registration loop that registers all tools from allTools, including update-task-stream, with name, schema, and execute handler.
    allTools.forEach((tool) => {
      server.registerTool(
        tool.name,
        {
          description: tool.description,
          inputSchema: "shape" in tool.parameters
            ? tool.parameters.shape
            : tool.parameters,
        },
        tool.execute,
      );
    });
  • Local registration of the updateTaskStreamTool in the taskTools array exported for higher-level inclusion.
    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)
    Global aggregation of all tools including taskTools (which contains update-task-stream) into allTools for MCP registration.
    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 the full burden of behavioral disclosure. It states this is an update operation, implying mutation, but doesn't cover critical aspects like required permissions, whether changes are reversible, error conditions, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with every part contributing to clarity.

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 this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., side effects, error handling), usage context, and output expectations, which are essential for an agent to use it correctly and safely.

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?

The schema description coverage is 100%, so the schema fully documents all three parameters (taskId, streamId, limitResponsePayload). The description adds no additional meaning beyond what's in the schema, such as explaining the relationship between task and stream or the impact of limitResponsePayload. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('update') and resource ('stream/channel assignment for a task'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'update-task-backlog' or 'update-task-complete', which also update task attributes but for different fields.

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., needing a valid taskId and streamId), exclusions, or comparisons to sibling tools like 'update-task-backlog' or 'get-streams', leaving the agent with no contextual usage information.

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