mcp-sunsama 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # mcp-sunsama
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 763b5b4: feat: add update-task-stream tool for task stream/channel assignment
8
+
9
+ Add new `update-task-stream` tool that allows updating the stream/channel assignment for existing Sunsama tasks. This tool provides the ability to:
10
+
11
+ - Assign tasks to one or more streams/channels
12
+ - Clear stream assignments by providing an empty array
13
+ - Set a recommended stream ID for the task
14
+ - Control response payload size with limitResponsePayload option
15
+
16
+ The tool follows the established patterns for parameter validation, error handling, and response formatting. Includes comprehensive test coverage and updated documentation.
17
+
18
+ - cde6e75: Add update-task-text tool for updating task titles/text
19
+
20
+ Implement new `update-task-text` MCP tool that allows updating the text/title of tasks using the Sunsama API. This tool follows the established patterns for task mutation operations and includes:
21
+
22
+ - Zod schema validation with comprehensive parameter documentation
23
+ - Support for optional recommended stream ID and response payload limiting
24
+ - Full test coverage with edge case validation
25
+ - Updated API documentation and README
26
+
3
27
  ## 0.11.0
4
28
 
5
29
  ### Minor Changes
package/CLAUDE.md CHANGED
@@ -130,7 +130,7 @@ Optional:
130
130
  ### Task Operations
131
131
  Full CRUD support:
132
132
  - **Read**: `get-tasks-by-day`, `get-tasks-backlog`, `get-archived-tasks`, `get-task-by-id`, `get-streams`
133
- - **Write**: `create-task`, `update-task-complete`, `update-task-planned-time`, `update-task-notes`, `update-task-snooze-date`, `update-task-backlog`, `delete-task`
133
+ - **Write**: `create-task`, `update-task-complete`, `update-task-planned-time`, `update-task-notes`, `update-task-snooze-date`, `update-task-backlog`, `update-task-stream`, `delete-task`
134
134
 
135
135
  Task read operations support response trimming. `get-tasks-by-day` includes completion filtering. `get-archived-tasks` includes enhanced pagination with hasMore flag for LLM decision-making.
136
136
 
package/README.md CHANGED
@@ -97,6 +97,8 @@ Add this configuration to your Claude Desktop MCP settings:
97
97
  - `update-task-planned-time` - Update the planned time (time estimate) for tasks
98
98
  - `update-task-notes` - Update task notes content (requires either `html` or `markdown` parameter, mutually exclusive)
99
99
  - `update-task-due-date` - Update the due date for tasks (set or clear due dates)
100
+ - `update-task-text` - Update the text/title of tasks
101
+ - `update-task-stream` - Update the stream/channel assignment for tasks
100
102
  - `update-task-snooze-date` - Reschedule tasks to different dates
101
103
  - `update-task-backlog` - Move tasks to the backlog
102
104
  - `delete-task` - Delete tasks permanently
package/bun.lock CHANGED
@@ -7,7 +7,7 @@
7
7
  "@types/papaparse": "^5.3.16",
8
8
  "fastmcp": "3.3.1",
9
9
  "papaparse": "^5.5.3",
10
- "sunsama-api": "0.9.0",
10
+ "sunsama-api": "0.10.0",
11
11
  "zod": "3.24.4",
12
12
  },
13
13
  "devDependencies": {
@@ -430,7 +430,7 @@
430
430
 
431
431
  "strtok3": ["strtok3@10.3.1", "", { "dependencies": { "@tokenizer/token": "^0.3.0" } }, "sha512-3JWEZM6mfix/GCJBBUrkA8p2Id2pBkyTkVCJKto55w080QBKZ+8R171fGrbiSp+yMO/u6F8/yUh7K4V9K+YCnw=="],
432
432
 
433
- "sunsama-api": ["sunsama-api@0.9.0", "", { "dependencies": { "graphql": "^16.11.0", "graphql-tag": "^2.12.6", "marked": "^14.1.3", "tough-cookie": "^5.1.2", "tslib": "^2.8.1", "turndown": "^7.2.0", "yjs": "^13.6.27", "zod": "^3.25.64" } }, "sha512-pSTS7+ZPjToeTnMiPuXDMrR/nbISl/fM5MqpdXV6LRBYlOmM/h9xUZO01BP9jhQYJWkasdw05KDHfCWYhUPjIg=="],
433
+ "sunsama-api": ["sunsama-api@0.10.0", "", { "dependencies": { "graphql": "^16.11.0", "graphql-tag": "^2.12.6", "marked": "^14.1.3", "tough-cookie": "^5.1.2", "tslib": "^2.8.1", "turndown": "^7.2.0", "yjs": "^13.6.27", "zod": "^3.25.64" } }, "sha512-PgWQdR0FKlgVuW8ZQVZfrEcxUS6BlYxneP3s7hR5/0CZqHI49cJ6Kvn6k8TMpTxGYZhhuOK0scZFwo+z3vQydw=="],
434
434
 
435
435
  "term-size": ["term-size@2.2.1", "", {}, "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg=="],
436
436
 
@@ -0,0 +1,112 @@
1
+ # Product Requirement Document: update-task-stream Tool
2
+
3
+ ## Overview
4
+ Implement a new MCP tool `update-task-stream` that allows updating the stream/channel assignment for existing Sunsama tasks.
5
+
6
+ ## Research Findings
7
+
8
+ ### Current Sunsama API Analysis
9
+ - Tasks have two stream-related fields:
10
+ - `streamIds`: Array of stream IDs that the task is assigned to
11
+ - `recommendedStreamId`: A single recommended stream ID for the task
12
+ - Existing mutations in sunsama-api library do not include an `updateTaskStream` mutation
13
+ - Tasks can be created with stream assignments using the `createTask` mutation with `streamIds` option
14
+ - Streams are accessible via `getStreamsByGroupId()` method
15
+
16
+ ### Implementation Decision
17
+ Since the sunsama-api library does not expose an `updateTaskStream` mutation, we need to:
18
+ 1. Create a new GraphQL mutation following the existing pattern
19
+ 2. Add the mutation to our local queries/mutations
20
+ 3. Implement the client method to handle stream updates
21
+ 4. Follow the same patterns as other update tools (text, notes, due date, etc.)
22
+
23
+ ## Requirements
24
+
25
+ ### Tool Name
26
+ `update-task-stream`
27
+
28
+ ### Description
29
+ "Update the stream/channel assignment for a task"
30
+
31
+ ### Parameters
32
+ - `taskId` (required): The ID of the task to update
33
+ - `streamIds` (required): Array of stream IDs to assign to the task
34
+ - `recommendedStreamId` (optional): Recommended stream ID for the task
35
+ - `limitResponsePayload` (optional): Whether to limit response size (defaults to true)
36
+
37
+ ### Implementation Strategy
38
+
39
+ #### 1. GraphQL Mutation
40
+ Create a new mutation following the pattern of other update mutations:
41
+ ```graphql
42
+ mutation updateTaskStream($input: UpdateTaskStreamInput!) {
43
+ updateTaskStream(input: $input) {
44
+ ...UpdateTaskPayload
45
+ __typename
46
+ }
47
+ }
48
+ ```
49
+
50
+ #### 2. Client Method
51
+ Add a new method `updateTaskStream` to the SunsamaClient class that:
52
+ - Validates taskId and streamIds parameters
53
+ - Calls the GraphQL mutation
54
+ - Returns the standard update result format
55
+
56
+ #### 3. MCP Tool Implementation
57
+ Follow the standard tool pattern:
58
+ - Zod schema for parameter validation
59
+ - Client resolution via `getSunsamaClient()`
60
+ - Error handling and logging
61
+ - JSON response format
62
+
63
+ ### Validation Rules
64
+ - `taskId`: Required string, minimum length 1
65
+ - `streamIds`: Required array of strings, minimum 0 items (allows clearing streams)
66
+ - `recommendedStreamId`: Optional string or null
67
+ - `limitResponsePayload`: Optional boolean, defaults to true
68
+
69
+ ### Response Format
70
+ JSON object with:
71
+ - `success`: Boolean indicating operation success
72
+ - `taskId`: The ID of the updated task
73
+ - `streamIds`: The new stream IDs assigned
74
+ - `recommendedStreamId`: The new recommended stream ID (if provided)
75
+ - `updatedFields`: Partial task object with updated fields (if not limited)
76
+
77
+ ### Integration Points
78
+
79
+ #### Schema Addition
80
+ Add `updateTaskStreamSchema` to `src/schemas.ts` with proper validation.
81
+
82
+ #### Tool Registration
83
+ Add tool to `src/main.ts` following existing patterns with:
84
+ - Parameter extraction and validation
85
+ - Client resolution
86
+ - API call execution
87
+ - Response formatting
88
+ - Error handling and logging
89
+
90
+ #### Documentation Updates
91
+ - Update API documentation resource in main.ts
92
+ - Update README.md with new tool information
93
+ - Add comprehensive test coverage
94
+
95
+ ### Testing Requirements
96
+ - Schema validation tests for all parameter combinations
97
+ - Edge cases: empty streamIds array, null recommendedStreamId
98
+ - Invalid parameter formats
99
+ - Required parameter validation
100
+
101
+ ### Migration Considerations
102
+ - This is a new tool, no backward compatibility concerns
103
+ - Follows established patterns for easy adoption
104
+ - No breaking changes to existing functionality
105
+
106
+ ## Success Criteria
107
+ 1. Tool successfully updates task stream assignments
108
+ 2. Proper validation of all parameters
109
+ 3. Consistent error handling and logging
110
+ 4. Comprehensive test coverage
111
+ 5. Documentation properly updated
112
+ 6. Follows existing code patterns and conventions
package/dist/main.js CHANGED
@@ -3,7 +3,7 @@ import { FastMCP } from "fastmcp";
3
3
  import { httpStreamAuthenticator } from "./auth/http.js";
4
4
  import { initializeStdioAuth } from "./auth/stdio.js";
5
5
  import { getTransportConfig } from "./config/transport.js";
6
- import { createTaskSchema, deleteTaskSchema, getArchivedTasksSchema, getStreamsSchema, getTaskByIdSchema, getTasksBacklogSchema, getTasksByDaySchema, getUserSchema, updateTaskBacklogSchema, updateTaskCompleteSchema, updateTaskDueDateSchema, updateTaskNotesSchema, updateTaskPlannedTimeSchema, updateTaskSnoozeDateSchema } from "./schemas.js";
6
+ import { createTaskSchema, deleteTaskSchema, getArchivedTasksSchema, getStreamsSchema, getTaskByIdSchema, getTasksBacklogSchema, getTasksByDaySchema, getUserSchema, updateTaskBacklogSchema, updateTaskCompleteSchema, updateTaskDueDateSchema, updateTaskNotesSchema, updateTaskPlannedTimeSchema, updateTaskSnoozeDateSchema, updateTaskStreamSchema, updateTaskTextSchema } from "./schemas.js";
7
7
  import { getSunsamaClient } from "./utils/client-resolver.js";
8
8
  import { filterTasksByCompletion } from "./utils/task-filters.js";
9
9
  import { trimTasksForResponse } from "./utils/task-trimmer.js";
@@ -16,7 +16,7 @@ if (transportConfig.transportType === "stdio") {
16
16
  }
17
17
  const server = new FastMCP({
18
18
  name: "Sunsama API Server",
19
- version: "0.11.0",
19
+ version: "0.12.0",
20
20
  instructions: `
21
21
  This MCP server provides access to the Sunsama API for task and project management.
22
22
 
@@ -24,7 +24,7 @@ Available tools:
24
24
  - Authentication: login, logout, check authentication status
25
25
  - User operations: get current user information
26
26
  - Task operations: get tasks by day, get backlog tasks, get archived tasks, get task by ID
27
- - Task mutations: create tasks, mark complete, delete tasks, reschedule tasks, update planned time, update task notes, update task due date
27
+ - Task mutations: create tasks, mark complete, delete tasks, reschedule tasks, update planned time, update task notes, update task due date, update task text, update task stream assignment
28
28
  - Stream operations: get streams/channels for the user's group
29
29
 
30
30
  Authentication is required for all operations. You can either:
@@ -672,6 +672,145 @@ server.addTool({
672
672
  }
673
673
  }
674
674
  });
675
+ server.addTool({
676
+ name: "update-task-text",
677
+ description: "Update the text/title of a task",
678
+ parameters: updateTaskTextSchema,
679
+ execute: async (args, { session, log }) => {
680
+ try {
681
+ // Extract parameters
682
+ const { taskId, text, recommendedStreamId, limitResponsePayload } = args;
683
+ log.info("Updating task text", {
684
+ taskId: taskId,
685
+ text: text,
686
+ recommendedStreamId: recommendedStreamId,
687
+ limitResponsePayload: limitResponsePayload
688
+ });
689
+ // Get the appropriate client based on transport type
690
+ const sunsamaClient = getSunsamaClient(session);
691
+ // Build options object
692
+ const options = {};
693
+ if (recommendedStreamId !== undefined)
694
+ options.recommendedStreamId = recommendedStreamId;
695
+ if (limitResponsePayload !== undefined)
696
+ options.limitResponsePayload = limitResponsePayload;
697
+ // Call sunsamaClient.updateTaskText(taskId, text, options)
698
+ const result = await sunsamaClient.updateTaskText(taskId, text, options);
699
+ log.info("Successfully updated task text", {
700
+ taskId: taskId,
701
+ text: text,
702
+ success: result.success
703
+ });
704
+ return {
705
+ content: [
706
+ {
707
+ type: "text",
708
+ text: JSON.stringify({
709
+ success: result.success,
710
+ taskId: taskId,
711
+ text: text,
712
+ textUpdated: true,
713
+ updatedFields: result.updatedFields
714
+ })
715
+ }
716
+ ]
717
+ };
718
+ }
719
+ catch (error) {
720
+ log.error("Failed to update task text", {
721
+ taskId: args.taskId,
722
+ text: args.text,
723
+ error: error instanceof Error ? error.message : 'Unknown error'
724
+ });
725
+ throw new Error(`Failed to update task text: ${error instanceof Error ? error.message : 'Unknown error'}`);
726
+ }
727
+ }
728
+ });
729
+ server.addTool({
730
+ name: "update-task-stream",
731
+ description: "Update the stream/channel assignment for a task",
732
+ parameters: updateTaskStreamSchema,
733
+ execute: async (args, { session, log }) => {
734
+ try {
735
+ // Extract parameters
736
+ const { taskId, streamIds, recommendedStreamId, limitResponsePayload } = args;
737
+ log.info("Updating task stream assignment", {
738
+ taskId: taskId,
739
+ streamIds: streamIds,
740
+ recommendedStreamId: recommendedStreamId,
741
+ limitResponsePayload: limitResponsePayload
742
+ });
743
+ // Get the appropriate client based on transport type
744
+ const sunsamaClient = getSunsamaClient(session);
745
+ // Since updateTaskStream doesn't exist in the upstream library, we'll make a direct GraphQL request
746
+ const updateTaskStreamMutation = `
747
+ mutation updateTaskStream($input: UpdateTaskStreamInput!) {
748
+ updateTaskStream(input: $input) {
749
+ success
750
+ updatedTask {
751
+ _id
752
+ streamIds
753
+ recommendedStreamId
754
+ }
755
+ updatedFields {
756
+ _id
757
+ streamIds
758
+ recommendedStreamId
759
+ }
760
+ }
761
+ }
762
+ `;
763
+ const variables = {
764
+ input: {
765
+ taskId,
766
+ streamIds,
767
+ recommendedStreamId: recommendedStreamId || null,
768
+ limitResponsePayload: limitResponsePayload ?? true,
769
+ },
770
+ };
771
+ // Make the GraphQL request using the client's graphqlRequest method
772
+ const response = await sunsamaClient.graphqlRequest({
773
+ operationName: 'updateTaskStream',
774
+ variables,
775
+ query: updateTaskStreamMutation,
776
+ });
777
+ if (!response.data) {
778
+ throw new Error('No response data received');
779
+ }
780
+ const result = response.data.updateTaskStream;
781
+ log.info("Successfully updated task stream assignment", {
782
+ taskId: taskId,
783
+ streamIds: streamIds,
784
+ recommendedStreamId: recommendedStreamId,
785
+ success: result.success
786
+ });
787
+ return {
788
+ content: [
789
+ {
790
+ type: "text",
791
+ text: JSON.stringify({
792
+ success: result.success,
793
+ taskId: taskId,
794
+ streamIds: streamIds,
795
+ recommendedStreamId: recommendedStreamId,
796
+ streamUpdated: true,
797
+ updatedFields: result.updatedFields
798
+ })
799
+ }
800
+ ]
801
+ };
802
+ }
803
+ catch (error) {
804
+ log.error("Failed to update task stream assignment", {
805
+ taskId: args.taskId,
806
+ streamIds: args.streamIds,
807
+ recommendedStreamId: args.recommendedStreamId,
808
+ error: error instanceof Error ? error.message : 'Unknown error'
809
+ });
810
+ throw new Error(`Failed to update task stream assignment: ${error instanceof Error ? error.message : 'Unknown error'}`);
811
+ }
812
+ }
813
+ });
675
814
  // Stream Operations
676
815
  server.addTool({
677
816
  name: "get-streams",
@@ -775,7 +914,7 @@ Uses HTTP Basic Auth headers (per-request authentication):
775
914
  - \`streamIds\` (optional): Array of stream IDs to associate with task
776
915
  - \`timeEstimate\` (optional): Time estimate in minutes
777
916
  - \`dueDate\` (optional): Due date string (ISO format)
778
- - \`snoozeUntil\` (optional): Snooze until date string (ISO format)
917
+ - \`snoozeUntil\` (optional): Snooze until date string (ISO format) - the date the task is scheduled for
779
918
  - \`private\` (optional): Whether the task is private
780
919
  - \`taskId\` (optional): Custom task ID
781
920
  - Returns: JSON with task creation result
@@ -818,6 +957,22 @@ Uses HTTP Basic Auth headers (per-request authentication):
818
957
  - \`limitResponsePayload\` (optional): Whether to limit response size
819
958
  - Returns: JSON with update result
820
959
 
960
+ - **update-task-text**: Update the text/title of a task
961
+ - Parameters:
962
+ - \`taskId\` (required): The ID of the task to update
963
+ - \`text\` (required): The new text/title for the task
964
+ - \`recommendedStreamId\` (optional): Recommended stream ID
965
+ - \`limitResponsePayload\` (optional): Whether to limit response size
966
+ - Returns: JSON with update result
967
+
968
+ - **update-task-stream**: Update the stream/channel assignment for a task
969
+ - Parameters:
970
+ - \`taskId\` (required): The ID of the task to update stream assignment for
971
+ - \`streamIds\` (required): Array of stream IDs to assign to the task (empty array clears all streams)
972
+ - \`recommendedStreamId\` (optional): Recommended stream ID for the task
973
+ - \`limitResponsePayload\` (optional): Whether to limit response size
974
+ - Returns: JSON with update result
975
+
821
976
  ### Stream Operations
822
977
  - **get-streams**: Get streams for the user's group
823
978
  - Parameters: none
package/dist/schemas.d.ts CHANGED
@@ -184,6 +184,38 @@ export declare const updateTaskDueDateSchema: z.ZodObject<{
184
184
  dueDate: string | null;
185
185
  limitResponsePayload?: boolean | undefined;
186
186
  }>;
187
+ export declare const updateTaskTextSchema: z.ZodObject<{
188
+ taskId: z.ZodString;
189
+ text: z.ZodString;
190
+ recommendedStreamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
191
+ limitResponsePayload: z.ZodOptional<z.ZodBoolean>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ taskId: string;
194
+ text: string;
195
+ limitResponsePayload?: boolean | undefined;
196
+ recommendedStreamId?: string | null | undefined;
197
+ }, {
198
+ taskId: string;
199
+ text: string;
200
+ limitResponsePayload?: boolean | undefined;
201
+ recommendedStreamId?: string | null | undefined;
202
+ }>;
203
+ export declare const updateTaskStreamSchema: z.ZodObject<{
204
+ taskId: z.ZodString;
205
+ streamIds: z.ZodArray<z.ZodString, "many">;
206
+ recommendedStreamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
207
+ limitResponsePayload: z.ZodOptional<z.ZodBoolean>;
208
+ }, "strip", z.ZodTypeAny, {
209
+ taskId: string;
210
+ streamIds: string[];
211
+ limitResponsePayload?: boolean | undefined;
212
+ recommendedStreamId?: string | null | undefined;
213
+ }, {
214
+ taskId: string;
215
+ streamIds: string[];
216
+ limitResponsePayload?: boolean | undefined;
217
+ recommendedStreamId?: string | null | undefined;
218
+ }>;
187
219
  /**
188
220
  * Response Type Schemas (for validation and documentation)
189
221
  */
@@ -620,6 +652,8 @@ export type UpdateTaskSnoozeDateInput = z.infer<typeof updateTaskSnoozeDateSchem
620
652
  export type UpdateTaskPlannedTimeInput = z.infer<typeof updateTaskPlannedTimeSchema>;
621
653
  export type UpdateTaskNotesInput = z.infer<typeof updateTaskNotesSchema>;
622
654
  export type UpdateTaskDueDateInput = z.infer<typeof updateTaskDueDateSchema>;
655
+ export type UpdateTaskTextInput = z.infer<typeof updateTaskTextSchema>;
656
+ export type UpdateTaskStreamInput = z.infer<typeof updateTaskStreamSchema>;
623
657
  export type User = z.infer<typeof userSchema>;
624
658
  export type Task = z.infer<typeof taskSchema>;
625
659
  export type Stream = z.infer<typeof streamSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schem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AAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
package/dist/schemas.js CHANGED
@@ -53,7 +53,7 @@ export const createTaskSchema = z.object({
53
53
  streamIds: z.array(z.string()).optional().describe("Array of stream IDs to associate with the task"),
54
54
  timeEstimate: z.number().int().positive().optional().describe("Time estimate in minutes"),
55
55
  dueDate: z.string().optional().describe("Due date string (ISO format)"),
56
- snoozeUntil: z.string().optional().describe("Snooze until date string (ISO format)"),
56
+ snoozeUntil: z.string().optional().describe("Snooze until date string (ISO format) - the date the task is scheduled for"),
57
57
  private: z.boolean().optional().describe("Whether the task is private"),
58
58
  taskId: z.string().optional().describe("Custom task ID (auto-generated if not provided)"),
59
59
  });
@@ -112,6 +112,20 @@ export const updateTaskDueDateSchema = z.object({
112
112
  ]).describe("Due date in ISO format (YYYY-MM-DDTHH:mm:ssZ) or null to clear the due date"),
113
113
  limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
114
114
  });
115
+ // Update task text parameters
116
+ export const updateTaskTextSchema = z.object({
117
+ taskId: z.string().min(1, "Task ID is required").describe("The ID of the task to update"),
118
+ text: z.string().min(1, "Task text is required").describe("The new text/title for the task"),
119
+ recommendedStreamId: z.string().nullable().optional().describe("Recommended stream ID (optional)"),
120
+ limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
121
+ });
122
+ // Update task stream parameters
123
+ export const updateTaskStreamSchema = z.object({
124
+ taskId: z.string().min(1, "Task ID is required").describe("The ID of the task to update stream assignment for"),
125
+ streamIds: z.array(z.string()).describe("Array of stream IDs to assign to the task (empty array clears all streams)"),
126
+ recommendedStreamId: z.string().nullable().optional().describe("Recommended stream ID for the task"),
127
+ limitResponsePayload: z.boolean().optional().describe("Whether to limit the response payload size"),
128
+ });
115
129
  /**
116
130
  * Response Type Schemas (for validation and documentation)
117
131
  */