Skip to main content
Glama

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, ];

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