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
| Name | Required | Description | Default |
|---|---|---|---|
| limitResponsePayload | No | Whether to limit the response payload size | |
| streamId | Yes | Stream ID to assign to the task | |
| taskId | Yes | The ID of the task to update stream assignment for |
Implementation Reference
- src/tools/task-tools.ts:381-403 (handler)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, }); }, });
- src/schemas.ts:263-273 (schema)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, ); });
- src/tools/task-tools.ts:406-426 (registration)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, ];