@open-sunsama/mcp 1.0.0 → 1.3.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/README.md +52 -14
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -18
- package/build/index.js.map +1 -1
- package/build/lib/api-client.d.ts +168 -26
- package/build/lib/api-client.d.ts.map +1 -1
- package/build/lib/api-client.js +81 -4
- package/build/lib/api-client.js.map +1 -1
- package/build/lib/define-tool.d.ts +17 -0
- package/build/lib/define-tool.d.ts.map +1 -0
- package/build/lib/define-tool.js +101 -0
- package/build/lib/define-tool.js.map +1 -0
- package/build/server.d.ts +19 -0
- package/build/server.d.ts.map +1 -0
- package/build/server.js +40 -0
- package/build/server.js.map +1 -0
- package/build/tools/calendar-events.d.ts +28 -0
- package/build/tools/calendar-events.d.ts.map +1 -0
- package/build/tools/calendar-events.js +209 -0
- package/build/tools/calendar-events.js.map +1 -0
- package/build/tools/ideas.d.ts +5 -0
- package/build/tools/ideas.d.ts.map +1 -0
- package/build/tools/ideas.js +106 -0
- package/build/tools/ideas.js.map +1 -0
- package/build/tools/subtasks.d.ts.map +1 -1
- package/build/tools/subtasks.js +6 -5
- package/build/tools/subtasks.js.map +1 -1
- package/build/tools/tasks.d.ts.map +1 -1
- package/build/tools/tasks.js +24 -12
- package/build/tools/tasks.js.map +1 -1
- package/build/tools/time-blocks.d.ts.map +1 -1
- package/build/tools/time-blocks.js +44 -28
- package/build/tools/time-blocks.js.map +1 -1
- package/build/tools/user.d.ts.map +1 -1
- package/build/tools/user.js +3 -2
- package/build/tools/user.js.map +1 -1
- package/package.json +16 -8
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a tool with the metadata Claude and ChatGPT expect on every
|
|
3
|
+
* tool: a human title, behavior annotations, and the OAuth scopes it needs.
|
|
4
|
+
* Keeping the table in one place means the tool files only carry the
|
|
5
|
+
* description, schema, and handler.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
import type { z, ZodRawShape } from "zod";
|
|
9
|
+
type ToolScope = "tasks:read" | "tasks:write" | "time-blocks:read" | "time-blocks:write" | "calendar:read" | "ideas:read" | "ideas:write" | "user:read" | "user:write";
|
|
10
|
+
type ToolHandler<Shape extends ZodRawShape> = (input: {
|
|
11
|
+
[Key in keyof Shape]: z.infer<Shape[Key]>;
|
|
12
|
+
}) => unknown | Promise<unknown>;
|
|
13
|
+
/** Union of every scope any tool needs — what an MCP client should request. */
|
|
14
|
+
export declare const MCP_TOOL_SCOPES: ToolScope[];
|
|
15
|
+
export declare function defineTool<Shape extends ZodRawShape>(server: McpServer, name: string, description: string, inputSchema: Shape, handler: ToolHandler<Shape>): void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=define-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-tool.d.ts","sourceRoot":"","sources":["../../src/lib/define-tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAE1C,KAAK,SAAS,GACV,YAAY,GACZ,aAAa,GACb,kBAAkB,GAClB,mBAAmB,GACnB,eAAe,GACf,YAAY,GACZ,aAAa,GACb,WAAW,GACX,YAAY,CAAC;AAUjB,KAAK,WAAW,CAAC,KAAK,SAAS,WAAW,IAAI,CAC5C,KAAK,EAAE;KAAG,GAAG,IAAI,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;CAAE,KACjD,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AA8EhC,+EAA+E;AAC/E,eAAO,MAAM,eAAe,EAAE,SAAS,EAEtC,CAAC;AAEF,wBAAgB,UAAU,CAAC,KAAK,SAAS,WAAW,EAClD,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,KAAK,EAClB,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,GAC1B,IAAI,CA6BN"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a tool with the metadata Claude and ChatGPT expect on every
|
|
3
|
+
* tool: a human title, behavior annotations, and the OAuth scopes it needs.
|
|
4
|
+
* Keeping the table in one place means the tool files only carry the
|
|
5
|
+
* description, schema, and handler.
|
|
6
|
+
*/
|
|
7
|
+
const TOOL_METADATA = {
|
|
8
|
+
// Tasks
|
|
9
|
+
list_tasks: { title: "List tasks", scopes: ["tasks:read"], readOnly: true },
|
|
10
|
+
get_task: { title: "Get task", scopes: ["tasks:read"], readOnly: true },
|
|
11
|
+
create_task: { title: "Create task", scopes: ["tasks:write"] },
|
|
12
|
+
update_task: { title: "Update task", scopes: ["tasks:write"], idempotent: true },
|
|
13
|
+
complete_task: { title: "Complete task", scopes: ["tasks:write"], idempotent: true },
|
|
14
|
+
uncomplete_task: { title: "Reopen task", scopes: ["tasks:write"], idempotent: true },
|
|
15
|
+
delete_task: { title: "Delete task", scopes: ["tasks:write"], destructive: true, idempotent: true },
|
|
16
|
+
schedule_task: { title: "Schedule task", scopes: ["tasks:write"], idempotent: true },
|
|
17
|
+
reorder_tasks: { title: "Reorder tasks", scopes: ["tasks:write"], idempotent: true },
|
|
18
|
+
// Subtasks
|
|
19
|
+
list_subtasks: { title: "List subtasks", scopes: ["tasks:read"], readOnly: true },
|
|
20
|
+
create_subtask: { title: "Create subtask", scopes: ["tasks:write"] },
|
|
21
|
+
toggle_subtask: { title: "Toggle subtask", scopes: ["tasks:write"] },
|
|
22
|
+
update_subtask: { title: "Update subtask", scopes: ["tasks:write"], idempotent: true },
|
|
23
|
+
delete_subtask: { title: "Delete subtask", scopes: ["tasks:write"], destructive: true, idempotent: true },
|
|
24
|
+
// Time blocks
|
|
25
|
+
list_time_blocks: { title: "List time blocks", scopes: ["time-blocks:read"], readOnly: true },
|
|
26
|
+
get_time_block: { title: "Get time block", scopes: ["time-blocks:read"], readOnly: true },
|
|
27
|
+
create_time_block: { title: "Create time block", scopes: ["time-blocks:write"] },
|
|
28
|
+
update_time_block: { title: "Update time block", scopes: ["time-blocks:write"], idempotent: true },
|
|
29
|
+
delete_time_block: {
|
|
30
|
+
title: "Delete time block",
|
|
31
|
+
scopes: ["time-blocks:write"],
|
|
32
|
+
destructive: true,
|
|
33
|
+
idempotent: true,
|
|
34
|
+
},
|
|
35
|
+
link_task_to_time_block: {
|
|
36
|
+
title: "Link task to time block",
|
|
37
|
+
scopes: ["time-blocks:write"],
|
|
38
|
+
idempotent: true,
|
|
39
|
+
},
|
|
40
|
+
get_schedule_for_day: {
|
|
41
|
+
title: "Get schedule for a day",
|
|
42
|
+
scopes: ["time-blocks:read", "calendar:read"],
|
|
43
|
+
readOnly: true,
|
|
44
|
+
},
|
|
45
|
+
// Calendar events (synced from Google, Outlook, iCloud)
|
|
46
|
+
list_calendar_events: { title: "List calendar events", scopes: ["calendar:read"], readOnly: true },
|
|
47
|
+
// Ideas
|
|
48
|
+
list_idea_boards: { title: "List idea boards", scopes: ["ideas:read"], readOnly: true },
|
|
49
|
+
create_idea_board: { title: "Create idea board", scopes: ["ideas:write"] },
|
|
50
|
+
update_idea_board: { title: "Update idea board", scopes: ["ideas:write"], idempotent: true },
|
|
51
|
+
delete_idea_board: { title: "Delete idea board", scopes: ["ideas:write"], destructive: true, idempotent: true },
|
|
52
|
+
reorder_idea_boards: { title: "Reorder idea boards", scopes: ["ideas:write"], idempotent: true },
|
|
53
|
+
list_idea_columns: { title: "List idea columns", scopes: ["ideas:read"], readOnly: true },
|
|
54
|
+
create_idea_column: { title: "Create idea column", scopes: ["ideas:write"] },
|
|
55
|
+
update_idea_column: { title: "Update idea column", scopes: ["ideas:write"], idempotent: true },
|
|
56
|
+
delete_idea_column: { title: "Delete idea column", scopes: ["ideas:write"], destructive: true, idempotent: true },
|
|
57
|
+
reorder_idea_columns: { title: "Reorder idea columns", scopes: ["ideas:write"], idempotent: true },
|
|
58
|
+
list_ideas: { title: "List ideas", scopes: ["ideas:read"], readOnly: true },
|
|
59
|
+
create_idea: { title: "Create idea", scopes: ["ideas:write"] },
|
|
60
|
+
update_idea: { title: "Update idea", scopes: ["ideas:write"], idempotent: true },
|
|
61
|
+
delete_idea: { title: "Delete idea", scopes: ["ideas:write"], destructive: true, idempotent: true },
|
|
62
|
+
reorder_ideas: { title: "Reorder ideas", scopes: ["ideas:write"], idempotent: true },
|
|
63
|
+
promote_idea: { title: "Promote idea to task", scopes: ["ideas:write", "tasks:write"] },
|
|
64
|
+
list_idea_subtasks: { title: "List idea subtasks", scopes: ["ideas:read"], readOnly: true },
|
|
65
|
+
create_idea_subtask: { title: "Create idea subtask", scopes: ["ideas:write"] },
|
|
66
|
+
update_idea_subtask: { title: "Update idea subtask", scopes: ["ideas:write"], idempotent: true },
|
|
67
|
+
delete_idea_subtask: { title: "Delete idea subtask", scopes: ["ideas:write"], destructive: true, idempotent: true },
|
|
68
|
+
reorder_idea_subtasks: { title: "Reorder idea subtasks", scopes: ["ideas:write"], idempotent: true },
|
|
69
|
+
// User
|
|
70
|
+
get_user_profile: { title: "Get profile", scopes: ["user:read"], readOnly: true },
|
|
71
|
+
update_user_profile: { title: "Update profile", scopes: ["user:write"], idempotent: true },
|
|
72
|
+
};
|
|
73
|
+
/** Union of every scope any tool needs — what an MCP client should request. */
|
|
74
|
+
export const MCP_TOOL_SCOPES = [
|
|
75
|
+
...new Set(Object.values(TOOL_METADATA).flatMap((m) => m.scopes)),
|
|
76
|
+
];
|
|
77
|
+
export function defineTool(server, name, description, inputSchema, handler) {
|
|
78
|
+
const meta = TOOL_METADATA[name];
|
|
79
|
+
if (!meta) {
|
|
80
|
+
throw new Error(`Missing TOOL_METADATA entry for MCP tool "${name}"`);
|
|
81
|
+
}
|
|
82
|
+
const securitySchemes = [{ type: "oauth2", scopes: meta.scopes }];
|
|
83
|
+
// The SDK's callback generic recursively expands each Zod schema, which can
|
|
84
|
+
// exceed TypeScript's heap for this server's complete tool set.
|
|
85
|
+
server.registerTool(name, {
|
|
86
|
+
title: meta.title,
|
|
87
|
+
description,
|
|
88
|
+
inputSchema,
|
|
89
|
+
annotations: {
|
|
90
|
+
title: meta.title,
|
|
91
|
+
readOnlyHint: meta.readOnly ?? false,
|
|
92
|
+
destructiveHint: meta.destructive ?? false,
|
|
93
|
+
idempotentHint: meta.idempotent ?? meta.readOnly ?? false,
|
|
94
|
+
// Tools only touch the user's own Open Sunsama account.
|
|
95
|
+
openWorldHint: false,
|
|
96
|
+
},
|
|
97
|
+
// ChatGPT reads securitySchemes to know the tool needs a linked account.
|
|
98
|
+
_meta: { securitySchemes },
|
|
99
|
+
}, handler);
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=define-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-tool.js","sourceRoot":"","sources":["../../src/lib/define-tool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgCH,MAAM,aAAa,GAAiC;IAClD,QAAQ;IACR,UAAU,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3E,QAAQ,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;IACvE,WAAW,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,aAAa,CAAC,EAAE;IAC9D,WAAW,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,aAAa,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IAChF,aAAa,EAAE,EAAE,KAAK,EA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nB,WAAkB,EAClB,OAA2B;IAE3B,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,6CAA6C,IAAI,GAAG,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAElE,4EAA4E;IAC5E,gEAAgE;IAC/D,MAAmC,CAAC,YAAY,CAC/C,IAAI,EACJ;QACE,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,WAAW;QACX,WAAW;QACX,WAAW,EAAE;YACX,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;YACpC,eAAe,EAAE,IAAI,CAAC,WAAW,IAAI,KAAK;YAC1C,cAAc,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK;YACzD,wDAAwD;YACxD,aAAa,EAAE,KAAK;SACrB;QACD,yEAAyE;QACzE,KAAK,EAAE,EAAE,eAAe,EAAE;KAC3B,EACD,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the Open Sunsama MCP server with every tool registered.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the stdio CLI (`src/index.ts`, API-key auth) and the API's remote
|
|
5
|
+
* Streamable HTTP endpoint (`/mcp`, OAuth auth). The caller decides how the
|
|
6
|
+
* ApiClient authenticates and which transport to connect.
|
|
7
|
+
*/
|
|
8
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
+
import { ApiClient, type ApiClientConfig } from "./lib/api-client.js";
|
|
10
|
+
export { ApiClient, type ApiClientConfig } from "./lib/api-client.js";
|
|
11
|
+
export { MCP_TOOL_SCOPES } from "./lib/define-tool.js";
|
|
12
|
+
export declare const MCP_SERVER_INFO: {
|
|
13
|
+
readonly name: "open-sunsama";
|
|
14
|
+
readonly title: "Open Sunsama";
|
|
15
|
+
readonly version: "1.3.0";
|
|
16
|
+
readonly websiteUrl: "https://opensunsama.com";
|
|
17
|
+
};
|
|
18
|
+
export declare function createOpenSunsamaMcpServer(client: ApiClient | ApiClientConfig): McpServer;
|
|
19
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQtE,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAQX,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,GAAG,eAAe,GAClC,SAAS,CAYX"}
|
package/build/server.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the Open Sunsama MCP server with every tool registered.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the stdio CLI (`src/index.ts`, API-key auth) and the API's remote
|
|
5
|
+
* Streamable HTTP endpoint (`/mcp`, OAuth auth). The caller decides how the
|
|
6
|
+
* ApiClient authenticates and which transport to connect.
|
|
7
|
+
*/
|
|
8
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
+
import { ApiClient } from "./lib/api-client.js";
|
|
10
|
+
import { registerTaskTools } from "./tools/tasks.js";
|
|
11
|
+
import { registerTimeBlockTools } from "./tools/time-blocks.js";
|
|
12
|
+
import { registerSubtaskTools } from "./tools/subtasks.js";
|
|
13
|
+
import { registerUserTools } from "./tools/user.js";
|
|
14
|
+
import { registerCalendarEventTools } from "./tools/calendar-events.js";
|
|
15
|
+
import { registerIdeaTools } from "./tools/ideas.js";
|
|
16
|
+
export { ApiClient } from "./lib/api-client.js";
|
|
17
|
+
export { MCP_TOOL_SCOPES } from "./lib/define-tool.js";
|
|
18
|
+
export const MCP_SERVER_INFO = {
|
|
19
|
+
name: "open-sunsama",
|
|
20
|
+
title: "Open Sunsama",
|
|
21
|
+
version: "1.3.0",
|
|
22
|
+
websiteUrl: "https://opensunsama.com",
|
|
23
|
+
};
|
|
24
|
+
const INSTRUCTIONS = `Open Sunsama is the user's daily planner: tasks scheduled on dates (or in the backlog), subtasks, time blocks on a calendar, Ideas boards with columns, cards and checklists, and read-only events from their connected Google, Outlook and iCloud calendars.
|
|
25
|
+
- Dates are YYYY-MM-DD in the user's timezone; call get_user_profile if you need the timezone.
|
|
26
|
+
- Use get_schedule_for_day to see a whole day at once (meetings and time blocks) before planning it, and plan time blocks around the meetings.
|
|
27
|
+
- Prefer schedule_task to move work between days and link_task_to_time_block to put a task on the calendar.
|
|
28
|
+
- Use Ideas boards for possibilities the user is not planning as tasks yet; promote_idea creates a task when they are ready to plan one.`;
|
|
29
|
+
export function createOpenSunsamaMcpServer(client) {
|
|
30
|
+
const apiClient = client instanceof ApiClient ? client : new ApiClient(client);
|
|
31
|
+
const server = new McpServer(MCP_SERVER_INFO, { instructions: INSTRUCTIONS });
|
|
32
|
+
registerTaskTools(server, apiClient);
|
|
33
|
+
registerTimeBlockTools(server, apiClient);
|
|
34
|
+
registerSubtaskTools(server, apiClient);
|
|
35
|
+
registerCalendarEventTools(server, apiClient);
|
|
36
|
+
registerIdeaTools(server, apiClient);
|
|
37
|
+
registerUserTools(server, apiClient);
|
|
38
|
+
return server;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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,SAAS,CAAC,CAAC;IAC9C,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrC,iBAAiB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAErC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools for Calendar Events
|
|
3
|
+
*
|
|
4
|
+
* Events synced from the user's connected Google, Outlook and iCloud
|
|
5
|
+
* calendars: meetings and other commitments that time blocks must plan
|
|
6
|
+
* around. Read-only; attendees and descriptions are never returned.
|
|
7
|
+
*/
|
|
8
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
+
import type { ApiClient, ApiResponse, CalendarEvent, CalendarEventsMeta } from "../lib/api-client.js";
|
|
10
|
+
export declare const CALENDAR_SCOPE_MISSING = "This connection can't read calendar events. To include meetings, disconnect Open Sunsama in your AI app and connect it again, then allow calendar access (the calendar:read permission). API keys need the calendar:read scope.";
|
|
11
|
+
/** Events for one local day, all-day first, then by start time. */
|
|
12
|
+
export declare function eventsOnDay(events: CalendarEvent[], day: string, timeZone: string): CalendarEvent[];
|
|
13
|
+
export declare function formatEventsForDay(events: CalendarEvent[], day: string, timeZone: string): string[];
|
|
14
|
+
export declare function isCalendarScopeError(response: ApiResponse<unknown, unknown>): boolean;
|
|
15
|
+
export declare function fetchCalendarEvents(apiClient: ApiClient, params: {
|
|
16
|
+
date?: string;
|
|
17
|
+
from?: string;
|
|
18
|
+
to?: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
ok: true;
|
|
21
|
+
events: CalendarEvent[];
|
|
22
|
+
meta: CalendarEventsMeta;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
message: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare function registerCalendarEventTools(server: McpServer, apiClient: ApiClient): void;
|
|
28
|
+
//# sourceMappingURL=calendar-events.d.ts.map
|
|
@@ -0,0 +1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|
4
|
+
* Events synced from the user's connected Google, Outlook and iCloud
|
|
5
|
+
* calendars: meetings and other commitments that time blocks must plan
|
|
6
|
+
* around. Read-only; attendees and descriptions are never returned.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
import { defineTool } from "../lib/define-tool.js";
|
|
10
|
+
const DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
|
|
11
|
+
const MAX_RANGE_DAYS = 31;
|
|
12
|
+
export const CALENDAR_SCOPE_MISSING = "This connection can't read calendar events. To include meetings, disconnect Open Sunsama in your AI app and connect it again, then allow calendar access (the calendar:read permission). API keys need the calendar:read scope.";
|
|
13
|
+
function addDays(date, days) {
|
|
14
|
+
const d = new Date(`${date}T00:00:00Z`);
|
|
15
|
+
d.setUTCDate(d.getUTCDate() + days);
|
|
16
|
+
return d.toISOString().slice(0, 10);
|
|
17
|
+
}
|
|
18
|
+
function localDate(instant, timeZone) {
|
|
19
|
+
// en-CA formats as YYYY-MM-DD.
|
|
20
|
+
return new Intl.DateTimeFormat("en-CA", {
|
|
21
|
+
timeZone,
|
|
22
|
+
year: "numeric",
|
|
23
|
+
month: "2-digit",
|
|
24
|
+
day: "2-digit",
|
|
25
|
+
}).format(instant);
|
|
26
|
+
}
|
|
27
|
+
function localTime(instant, timeZone) {
|
|
28
|
+
return new Intl.DateTimeFormat("en-GB", {
|
|
29
|
+
timeZone,
|
|
30
|
+
hour: "2-digit",
|
|
31
|
+
minute: "2-digit",
|
|
32
|
+
hourCycle: "h23",
|
|
33
|
+
}).format(instant);
|
|
34
|
+
}
|
|
35
|
+
/** Local dates [first, last] an event covers, in the user's timezone. */
|
|
36
|
+
function eventDays(event, timeZone) {
|
|
37
|
+
const start = new Date(event.startTime);
|
|
38
|
+
const end = new Date(event.endTime);
|
|
39
|
+
if (event.isAllDay) {
|
|
40
|
+
// Stored as UTC midnight of the date, end exclusive.
|
|
41
|
+
const first = event.startTime.slice(0, 10);
|
|
42
|
+
const last = addDays(event.endTime.slice(0, 10), -1);
|
|
43
|
+
return [first, last < first ? first : last];
|
|
44
|
+
}
|
|
45
|
+
const first = localDate(start, timeZone);
|
|
46
|
+
const lastInstant = end > start ? new Date(end.getTime() - 1) : start;
|
|
47
|
+
return [first, localDate(lastInstant, timeZone)];
|
|
48
|
+
}
|
|
49
|
+
function eventFlags(event) {
|
|
50
|
+
const flags = [];
|
|
51
|
+
if (event.responseStatus === "declined")
|
|
52
|
+
flags.push("declined");
|
|
53
|
+
else if (event.status === "tentative" || event.responseStatus === "tentative")
|
|
54
|
+
flags.push("tentative");
|
|
55
|
+
else if (event.responseStatus === "needsAction")
|
|
56
|
+
flags.push("not yet answered");
|
|
57
|
+
return flags.length ? ` (${flags.join(", ")})` : "";
|
|
58
|
+
}
|
|
59
|
+
function formatEventLine(event, day, timeZone) {
|
|
60
|
+
let when;
|
|
61
|
+
if (event.isAllDay) {
|
|
62
|
+
when = "All day";
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const start = new Date(event.startTime);
|
|
66
|
+
const end = new Date(event.endTime);
|
|
67
|
+
const startDay = localDate(start, timeZone);
|
|
68
|
+
const endDay = localDate(end, timeZone);
|
|
69
|
+
const startLabel = startDay === day ? localTime(start, timeZone) : `${startDay} ${localTime(start, timeZone)}`;
|
|
70
|
+
const endLabel = endDay === day ? localTime(end, timeZone) : `${endDay} ${localTime(end, timeZone)}`;
|
|
71
|
+
when = `${startLabel} - ${endLabel}`;
|
|
72
|
+
}
|
|
73
|
+
const calendar = event.calendar?.name ? ` [${event.calendar.name}]` : "";
|
|
74
|
+
const location = event.location ? ` @ ${event.location}` : "";
|
|
75
|
+
return `${when}: ${event.title}${calendar}${location}${eventFlags(event)}`;
|
|
76
|
+
}
|
|
77
|
+
/** Events for one local day, all-day first, then by start time. */
|
|
78
|
+
export function eventsOnDay(events, day, timeZone) {
|
|
79
|
+
return events
|
|
80
|
+
.filter((e) => e.status !== "cancelled")
|
|
81
|
+
.filter((e) => {
|
|
82
|
+
const [first, last] = eventDays(e, timeZone);
|
|
83
|
+
return first <= day && day <= last;
|
|
84
|
+
})
|
|
85
|
+
.sort((a, b) => {
|
|
86
|
+
if (a.isAllDay !== b.isAllDay)
|
|
87
|
+
return a.isAllDay ? -1 : 1;
|
|
88
|
+
return a.startTime.localeCompare(b.startTime);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export function formatEventsForDay(events, day, timeZone) {
|
|
92
|
+
return eventsOnDay(events, day, timeZone).map((e) => formatEventLine(e, day, timeZone));
|
|
93
|
+
}
|
|
94
|
+
export function isCalendarScopeError(response) {
|
|
95
|
+
const status = response.error?.statusCode;
|
|
96
|
+
const message = response.error?.message ?? "";
|
|
97
|
+
return (status === 401 || status === 403) && message.includes("calendar:read");
|
|
98
|
+
}
|
|
99
|
+
export async function fetchCalendarEvents(apiClient, params) {
|
|
100
|
+
const response = await apiClient.listCalendarEvents(params);
|
|
101
|
+
if (!response.success) {
|
|
102
|
+
if (isCalendarScopeError(response))
|
|
103
|
+
return { ok: false, message: CALENDAR_SCOPE_MISSING };
|
|
104
|
+
return { ok: false, message: response.error?.message || "Failed to list calendar events" };
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
ok: true,
|
|
108
|
+
events: response.data ?? [],
|
|
109
|
+
meta: response.meta ?? { total: response.data?.length ?? 0, timezone: "UTC" },
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function successResponse(text) {
|
|
113
|
+
return { content: [{ type: "text", text }] };
|
|
114
|
+
}
|
|
115
|
+
function errorResponse(message) {
|
|
116
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
117
|
+
}
|
|
118
|
+
export function registerCalendarEventTools(server, apiClient) {
|
|
119
|
+
defineTool(server, "list_calendar_events", `List events from the user's connected calendars (Google, Outlook, iCloud) for a day or a range of days.
|
|
120
|
+
|
|
121
|
+
Use this tool to:
|
|
122
|
+
- See meetings and other commitments before planning or time-blocking a day
|
|
123
|
+
- Find free time between meetings
|
|
124
|
+
- Answer "what's on my calendar this week?"
|
|
125
|
+
|
|
126
|
+
Dates are YYYY-MM-DD in the user's timezone, and times are shown in that timezone.
|
|
127
|
+
Treat events as busy time: they are read-only here and cannot be moved or edited.
|
|
128
|
+
For a full day view with time blocks too, use get_schedule_for_day.
|
|
129
|
+
|
|
130
|
+
Returns each event's time (or "All day"), title, calendar name, and location.
|
|
131
|
+
Declined and tentative events are marked. Cancelled events are left out.`, {
|
|
132
|
+
date: z
|
|
133
|
+
.string()
|
|
134
|
+
.optional()
|
|
135
|
+
.describe("A single day in YYYY-MM-DD format (e.g., '2024-01-15'). Cannot be used with from/to."),
|
|
136
|
+
from: z
|
|
137
|
+
.string()
|
|
138
|
+
.optional()
|
|
139
|
+
.describe(`First day of a range in YYYY-MM-DD format. Use with 'to'. Ranges are at most ${MAX_RANGE_DAYS} days.`),
|
|
140
|
+
to: z
|
|
141
|
+
.string()
|
|
142
|
+
.optional()
|
|
143
|
+
.describe("Last day of the range (inclusive) in YYYY-MM-DD format. Use with 'from'."),
|
|
144
|
+
calendars: z
|
|
145
|
+
.array(z.string())
|
|
146
|
+
.optional()
|
|
147
|
+
.describe("Only include events from these calendars, by calendar name (case-insensitive) or ID. Omit for all calendars."),
|
|
148
|
+
}, async (input) => {
|
|
149
|
+
try {
|
|
150
|
+
let fromDate;
|
|
151
|
+
let toDate;
|
|
152
|
+
if (input.date) {
|
|
153
|
+
if (input.from || input.to)
|
|
154
|
+
return errorResponse("Pass either 'date', or 'from' and 'to', not both.");
|
|
155
|
+
fromDate = toDate = input.date;
|
|
156
|
+
}
|
|
157
|
+
else if (input.from && input.to) {
|
|
158
|
+
fromDate = input.from;
|
|
159
|
+
toDate = input.to;
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
return errorResponse("Pass 'date', or both 'from' and 'to' (YYYY-MM-DD).");
|
|
163
|
+
}
|
|
164
|
+
for (const d of [fromDate, toDate]) {
|
|
165
|
+
if (!DATE_REGEX.test(d) || Number.isNaN(Date.parse(d))) {
|
|
166
|
+
return errorResponse(`Invalid date '${d}'. Use YYYY-MM-DD format (e.g., '2024-01-15')`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (toDate < fromDate)
|
|
170
|
+
return errorResponse(`'to' (${toDate}) must not be before 'from' (${fromDate}).`);
|
|
171
|
+
const spanDays = (Date.parse(toDate) - Date.parse(fromDate)) / 86_400_000 + 1;
|
|
172
|
+
if (spanDays > MAX_RANGE_DAYS) {
|
|
173
|
+
return errorResponse(`Range is ${spanDays} days; ask for at most ${MAX_RANGE_DAYS} days at a time.`);
|
|
174
|
+
}
|
|
175
|
+
const result = await fetchCalendarEvents(apiClient, input.date ? { date: fromDate } : { from: fromDate, to: toDate });
|
|
176
|
+
if (!result.ok)
|
|
177
|
+
return errorResponse(result.message);
|
|
178
|
+
const timeZone = result.meta.timezone;
|
|
179
|
+
let events = result.events;
|
|
180
|
+
if (input.calendars?.length) {
|
|
181
|
+
const wanted = input.calendars.map((c) => c.trim().toLowerCase());
|
|
182
|
+
events = events.filter((e) => !!e.calendar &&
|
|
183
|
+
(wanted.includes(e.calendar.id.toLowerCase()) || wanted.includes(e.calendar.name.toLowerCase())));
|
|
184
|
+
}
|
|
185
|
+
const rangeLabel = fromDate === toDate ? fromDate : `${fromDate} to ${toDate}`;
|
|
186
|
+
const lines = [`Calendar events for ${rangeLabel} (times in ${timeZone}):`];
|
|
187
|
+
let count = 0;
|
|
188
|
+
for (let day = fromDate; day <= toDate; day = addDays(day, 1)) {
|
|
189
|
+
const dayLines = formatEventsForDay(events, day, timeZone);
|
|
190
|
+
count += dayLines.length;
|
|
191
|
+
if (fromDate === toDate) {
|
|
192
|
+
lines.push(...dayLines);
|
|
193
|
+
}
|
|
194
|
+
else if (dayLines.length) {
|
|
195
|
+
lines.push("", `${day}:`, ...dayLines.map((l) => ` ${l}`));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (count === 0) {
|
|
199
|
+
const scope = input.calendars?.length ? " in the selected calendars" : "";
|
|
200
|
+
return successResponse(`No calendar events for ${rangeLabel}${scope}. (Only calendars connected and turned on in Open Sunsama are included.)`);
|
|
201
|
+
}
|
|
202
|
+
return successResponse(lines.join("\n"));
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
return errorResponse(error instanceof Error ? error.message : "Unknown error");
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
//# sourceMappingURL=calendar-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-events.js","sourceRoot":"","sources":["../../src/tools/calendar-events.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,UAAU,GAAG,qBAAqB,CAAC;AACzC,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GACjC,iOAAiO,CAAC;AAEpO,SAAS,OAAO,CAAC,IAAY,EAAE,IAAY;IACzC,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,YAAY,CAAC,CAAC;IACxC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IACpC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,SAAS,CAAC,OAAa,EAAE,QAAgB;IAChD,+BAA+B;IAC/B,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;QACtC,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,GAAG,EAAE,SAAS;KACf,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,SAAS,CAAC,OA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GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9D,CAAC;YACH,CAAC;YAED,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBAChB,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC1E,OAAO,eAAe,CACpB,0BAA0B,UAAU,GAAG,KAAK,0EAA0E,CACvH,CAAC;YACJ,CAAC;YACD,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,aAAa,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACjF,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** MCP access to the Ideas boards, columns, cards, and card checklists. */
|
|
2
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import type { ApiClient } from "../lib/api-client.js";
|
|
4
|
+
export declare function registerIdeaTools(server: McpServer, api: ApiClient): void;
|
|
5
|
+
//# sourceMappingURL=ideas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ideas.d.ts","sourceRoot":"","sources":["../../src/tools/ideas.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAe,MAAM,sBAAsB,CAAC;AAwCnE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,GAAG,IAAI,CAyPzE"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineTool } from "../lib/define-tool.js";
|
|
3
|
+
const id = z.string().uuid();
|
|
4
|
+
const position = z.number().int().nonnegative();
|
|
5
|
+
const name = z.string().min(1).max(120);
|
|
6
|
+
const title = z.string().min(1).max(500);
|
|
7
|
+
const priority = z.enum(["P0", "P1", "P2", "P3"]);
|
|
8
|
+
const icon = z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.max(64)
|
|
12
|
+
.regex(/^[A-Za-z0-9]+$/);
|
|
13
|
+
const color = z.string().regex(/^#[0-9A-Fa-f]{6}$/);
|
|
14
|
+
const notes = z.string().max(5000).nullable();
|
|
15
|
+
const estimatedMins = z.number().int().positive().max(1440).nullable();
|
|
16
|
+
const ids = z.array(id).min(1);
|
|
17
|
+
function result(response, fallback) {
|
|
18
|
+
if (!response.success) {
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: "text",
|
|
23
|
+
text: `Error: ${response.error?.message ?? fallback}`,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
isError: true,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
content: [
|
|
31
|
+
{
|
|
32
|
+
type: "text",
|
|
33
|
+
text: JSON.stringify(response.data ?? response.message ?? { success: true }),
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function registerIdeaTools(server, api) {
|
|
39
|
+
defineTool(server, "list_idea_boards", "List the user's Ideas boards in display order.", {}, async () => result(await api.listIdeaBoards(), "Failed to list boards"));
|
|
40
|
+
defineTool(server, "create_idea_board", "Create an Ideas board. The server also creates an initial column named Ideas; the response includes that column and its ID.", {
|
|
41
|
+
name,
|
|
42
|
+
icon: icon.optional(),
|
|
43
|
+
color: color.optional(),
|
|
44
|
+
position: position.optional(),
|
|
45
|
+
}, async (input) => result(await api.createIdeaBoard(input), "Failed to create board"));
|
|
46
|
+
defineTool(server, "update_idea_board", "Rename, recolor, change the icon, or position an Ideas board.", {
|
|
47
|
+
id,
|
|
48
|
+
name: name.optional(),
|
|
49
|
+
icon: icon.optional(),
|
|
50
|
+
color: color.optional(),
|
|
51
|
+
position: position.optional(),
|
|
52
|
+
}, async ({ id, ...data }) => result(await api.updateIdeaBoard(id, data), "Failed to update board"));
|
|
53
|
+
defineTool(server, "delete_idea_board", "Delete a board and all its columns, ideas, and idea subtasks permanently.", { id }, async ({ id }) => result(await api.deleteIdeaBoard(id), "Failed to delete board"));
|
|
54
|
+
defineTool(server, "reorder_idea_boards", "Set the display order of all Ideas boards. Supply their IDs in the desired order.", { boardIds: ids }, async ({ boardIds }) => result(await api.reorderIdeaBoards(boardIds), "Failed to reorder boards"));
|
|
55
|
+
defineTool(server, "list_idea_columns", "List the columns on one Ideas board in display order.", { boardId: id }, async ({ boardId }) => result(await api.listIdeaColumns(boardId), "Failed to list columns"));
|
|
56
|
+
defineTool(server, "create_idea_column", "Create a column on an Ideas board.", { boardId: id, name, position: position.optional() }, async (input) => result(await api.createIdeaColumn(input), "Failed to create column"));
|
|
57
|
+
defineTool(server, "update_idea_column", "Rename or position an Ideas column.", { id, name: name.optional(), position: position.optional() }, async ({ id, ...data }) => result(await api.updateIdeaColumn(id, data), "Failed to update column"));
|
|
58
|
+
defineTool(server, "delete_idea_column", "Delete a column and all its ideas and idea subtasks permanently.", { id }, async ({ id }) => result(await api.deleteIdeaColumn(id), "Failed to delete column"));
|
|
59
|
+
defineTool(server, "reorder_idea_columns", "Set the display order of all columns on a board. Supply their IDs in the desired order.", { boardId: id, columnIds: ids }, async ({ boardId, columnIds }) => result(await api.reorderIdeaColumns(boardId, columnIds), "Failed to reorder columns"));
|
|
60
|
+
defineTool(server, "list_ideas", "List idea cards, optionally filtered by board, column, or completion. The response includes each card's ID, fields, and subtask counts.", {
|
|
61
|
+
boardId: id.optional(),
|
|
62
|
+
columnId: id.optional(),
|
|
63
|
+
completed: z.boolean().optional(),
|
|
64
|
+
}, async (input) => result(await api.listIdeas(input), "Failed to list ideas"));
|
|
65
|
+
defineTool(server, "create_idea", "Create an idea card in a column on the specified board.", {
|
|
66
|
+
boardId: id,
|
|
67
|
+
columnId: id,
|
|
68
|
+
title,
|
|
69
|
+
notes: notes.optional(),
|
|
70
|
+
estimatedMins: estimatedMins.optional(),
|
|
71
|
+
priority: priority.optional(),
|
|
72
|
+
position: position.optional(),
|
|
73
|
+
}, async (input) => result(await api.createIdea(input), "Failed to create idea"));
|
|
74
|
+
defineTool(server, "update_idea", "Edit an idea card, move it to another column, or set completedAt to an ISO timestamp or null to mark it done or reopen it.", {
|
|
75
|
+
id,
|
|
76
|
+
title: title.optional(),
|
|
77
|
+
notes: notes.optional(),
|
|
78
|
+
estimatedMins: estimatedMins.optional(),
|
|
79
|
+
priority: priority.optional(),
|
|
80
|
+
columnId: id.optional(),
|
|
81
|
+
position: position.optional(),
|
|
82
|
+
completedAt: z.string().datetime().nullable().optional(),
|
|
83
|
+
}, async ({ id, ...data }) => result(await api.updateIdea(id, data), "Failed to update idea"));
|
|
84
|
+
defineTool(server, "delete_idea", "Delete an idea card and its subtasks permanently. A task previously promoted from it remains a task.", { id }, async ({ id }) => result(await api.deleteIdea(id), "Failed to delete idea"));
|
|
85
|
+
defineTool(server, "reorder_ideas", "Set the order of cards in a column. Cards can be moved from another column or board. Supply the complete destination order.", { columnId: id, ideaIds: ids }, async ({ columnId, ideaIds }) => result(await api.reorderIdeas(columnId, ideaIds), "Failed to reorder ideas"));
|
|
86
|
+
defineTool(server, "promote_idea", "Create a planner task from an idea card. Omit scheduledDate to put the task in the backlog. The idea remains and records the task ID.", {
|
|
87
|
+
id,
|
|
88
|
+
scheduledDate: z
|
|
89
|
+
.string()
|
|
90
|
+
.regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
91
|
+
.nullable()
|
|
92
|
+
.optional(),
|
|
93
|
+
}, async ({ id, scheduledDate }) => result(await api.promoteIdea(id, scheduledDate), "Failed to promote idea"));
|
|
94
|
+
defineTool(server, "list_idea_subtasks", "List an idea card's checklist items.", { ideaId: id }, async ({ ideaId }) => result(await api.listIdeaSubtasks(ideaId), "Failed to list idea subtasks"));
|
|
95
|
+
defineTool(server, "create_idea_subtask", "Add a checklist item to an idea card.", { ideaId: id, title, position: position.optional() }, async ({ ideaId, ...data }) => result(await api.createIdeaSubtask(ideaId, data), "Failed to create idea subtask"));
|
|
96
|
+
defineTool(server, "update_idea_subtask", "Rename, complete, reopen, or position an idea checklist item.", {
|
|
97
|
+
ideaId: id,
|
|
98
|
+
id,
|
|
99
|
+
title: title.optional(),
|
|
100
|
+
completed: z.boolean().optional(),
|
|
101
|
+
position: position.optional(),
|
|
102
|
+
}, async ({ ideaId, id, ...data }) => result(await api.updateIdeaSubtask(ideaId, id, data), "Failed to update idea subtask"));
|
|
103
|
+
defineTool(server, "delete_idea_subtask", "Delete an idea checklist item permanently.", { ideaId: id, id }, async ({ ideaId, id }) => result(await api.deleteIdeaSubtask(ideaId, id), "Failed to delete idea subtask"));
|
|
104
|
+
defineTool(server, "reorder_idea_subtasks", "Set the order of checklist items on an idea card. Supply their IDs in the desired order.", { ideaId: id, subtaskIds: ids }, async ({ ideaId, subtaskIds }) => result(await api.reorderIdeaSubtasks(ideaId, subtaskIds), "Failed to reorder idea subtasks"));
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=ideas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ideas.js","sourceRoot":"","sources":["../../src/tools/ideas.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;AAC7B,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,E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IAEF,UAAU,CACR,MAAM,EACN,qBAAqB,EACrB,4CAA4C,EAC5C,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAClB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CACvB,MAAM,CACJ,MAAM,GAAG,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,EACvC,+BAA+B,CAChC,CACJ,CAAC;IAEF,UAAU,CACR,MAAM,EACN,uBAAuB,EACvB,0FAA0F,EAC1F,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,EAC/B,KAAK,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,CAC/B,MAAM,CACJ,MAAM,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,EACjD,iCAAiC,CAClC,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subtasks.d.ts","sourceRoot":"","sources":["../../src/tools/subtasks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"subtasks.d.ts","sourceRoot":"","sources":["../../src/tools/subtasks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,sBAAsB,CAAC;AAwC/D;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,SAAS,GACnB,IAAI,CA0QN"}
|