corkcrm-mcp 0.7.0 → 0.8.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/dist/descriptions.d.ts +1 -1
- package/dist/descriptions.js +28 -126
- package/dist/descriptions.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js +7 -6
- package/dist/instructions.js.map +1 -1
- package/dist/schemas.js +56 -66
- package/dist/schemas.js.map +1 -1
- package/dist/tools.js +13 -1
- package/dist/tools.js.map +1 -1
- package/dist/writeSchemas.js +16 -16
- package/dist/writeSchemas.js.map +1 -1
- package/package.json +6 -1
package/dist/descriptions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ToolName = "find_tasks" | "get_task" | "count_tasks" | "list_views" | "list_projects" | "get_workspace_info" | "resolve" | "find_timecards" | "sum_time" | "find_comments" | "create_task" | "update_task" | "place_task" | "set_order" | "bulk_update_tasks" | "move_task" | "delete_task" | "add_comment" | "edit_comment" | "delete_comment" | "link_pull_request";
|
|
1
|
+
export type ToolName = "find_tasks" | "get_task" | "count_tasks" | "list_views" | "list_projects" | "get_workspace_info" | "resolve" | "find_timecards" | "sum_time" | "find_comments" | "create_task" | "update_task" | "place_task" | "set_order" | "bulk_update_tasks" | "move_task" | "delete_task" | "add_comment" | "edit_comment" | "delete_comment" | "link_pull_request" | "help";
|
|
2
2
|
export declare const DESCRIPTIONS: Record<ToolName, {
|
|
3
3
|
title: string;
|
|
4
4
|
description: string;
|
package/dist/descriptions.js
CHANGED
|
@@ -1,192 +1,94 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Short descriptions: just enough for Claude to pick the tool and call it right (Shorter Tool List design,
|
|
2
|
+
// October 12, 2026). The long guidance each tool had is in help.ts, under the tool's own topic.
|
|
3
|
+
// Caps per tool are in mcp/test/budget.test.ts.
|
|
2
4
|
export const DESCRIPTIONS = {
|
|
3
5
|
find_tasks: {
|
|
4
6
|
title: "Find tasks",
|
|
5
|
-
description: `
|
|
6
|
-
|
|
7
|
-
Use it for any question that lists or searches tasks: "Hassan's open tasks", "what's due this month", "tasks with 'invoice' in the name", "the P2 tasks in Inbox in order", "what's in Hassan's dev view". "What is Hassan working on" means the In Progress milestones of his dev view, not an assignee filter: {"view":"Hassan","group":"In Progress","level":"milestone"}; "Hassan's open tasks" still uses \`assignee\`. Do not use it to fetch one task by alpha-ID (use get_task), to count (use count_tasks), to list views (list_views) or projects (list_projects), or to look up an ID for a name you are unsure of (use resolve first).
|
|
8
|
-
|
|
9
|
-
Names are accepted for assignee, status, priority, view, project, and milestone and are matched in this workspace only. If a name matches several things, the call returns candidates and no rows; call again with the ID or add \`view\` or \`project\` to narrow. Two projects can share a name across views, so pass \`view\` with \`project\` whenever the person named the view. A dev view expands to the milestones assigned to its person plus every task and subtask under them, whoever they are assigned to; that is not the same as \`assignee\`.
|
|
10
|
-
|
|
11
|
-
Completed and cancelled rows are hidden unless \`include_completed\` is true, or \`status_type\` names \`completed\` or \`cancelled\`, or \`completed_from\`/\`completed_to\` is given. Rows closed more than 180 days ago are hidden unless \`include_archived\` is true. A result of zero rows with hidden_closed > 0 means the match exists but is closed. Dates are YYYY-MM-DD, inclusive; rows with no date in a filtered field are dropped; read today's date from get_workspace_info. \`status_type\` values: not_started, active, completed, cancelled. \`priority\` accepts a workspace priority name, \`none\`, or \`highest\`. \`sort\` values: view_order (default), end_date_asc, end_date_desc, start_date_asc, start_date_desc, completed_at_asc, completed_at_desc, name_asc, name_desc. \`limit\` 1 to 200, default 50. A call that returns more than 25 rows leads with a summary of all of them (by project, by priority, and by status when mixed) and carries only the first 25 rows, with the total and a cursor; pass the cursor back with the same arguments for the next page.
|
|
12
|
-
|
|
13
|
-
Text search is a case-insensitive substring on name (\`name\`), description (\`description\`), or either (\`text\`); these OR together and AND with everything else. It does not search comments (use find_comments), tags, assignee names, project names, due dates, hours, or custom columns, and it does not match words out of order or with typos. Example: {"assignee":"Hassan","end_from":"2026-09-01","end_to":"2026-09-30","name":"estimating","description":"pizza"}
|
|
14
|
-
|
|
15
|
-
To show it: group by project and milestone for app-order lists; one table sorted by date for due or overdue questions; leave IDs out unless asked.`,
|
|
7
|
+
description: `Lists or searches tasks by filter, text, or both: "Hassan's open tasks", "what's due this month", "tasks with 'invoice' in the name", what's in a dev view. Completed, cancelled, and archived rows are hidden unless asked for, and the answer counts them. Names work for people, statuses, views, projects, and milestones. Not for one task by ID (get_task), counts (count_tasks), comments (find_comments), or an ID you're unsure of (resolve). More: help topic find_tasks (text search limits, dev views, dates, sorting, paging).`,
|
|
16
8
|
},
|
|
17
9
|
get_task: {
|
|
18
10
|
title: "Get one task",
|
|
19
|
-
description: `
|
|
20
|
-
|
|
21
|
-
Use it for "where does alpha-482 sit", "which view is it in", "what are its subtasks", "what else is in the same milestone", "what's been said on alpha-482". Do not use it to search by name (use find_tasks), to list a container's whole subtree (use find_tasks with project or milestone), or to search comments across tasks (use find_comments). Example: {"id":"alpha-482","include_siblings":true}
|
|
22
|
-
|
|
23
|
-
To show it: a short card -- name linked, where it sits, status, people, dates, then the description, subtasks, and newest comments.`,
|
|
11
|
+
description: `Gets one task by alpha-ID (alpha-482) or Convex ID: the full record, where it sits, its children, linked pull requests, and newest comments; include_siblings shows the rest of its list. Returned even when closed. Not for searching by name (find_tasks) or comments across tasks (find_comments). More: help topic get_task.`,
|
|
24
12
|
},
|
|
25
13
|
count_tasks: {
|
|
26
14
|
title: "Count tasks",
|
|
27
|
-
description: `
|
|
28
|
-
|
|
29
|
-
Use it for "how many", "how many per person", "how many in each view". Do not use it to see the tasks themselves (use find_tasks). Example: {"count_by":"assignee","completed_from":"2026-08-01","completed_to":"2026-08-31"}
|
|
30
|
-
|
|
31
|
-
To show it: a small table, then the total and what was hidden.`,
|
|
15
|
+
description: `Counts tasks with the same filters as find_tasks, optionally by view, assignee, status, priority, or level: "how many", "how many per person". Exact and never capped, with hidden closed and archived counts. Not for seeing the tasks (find_tasks). More: help topic count_tasks.`,
|
|
32
16
|
},
|
|
33
17
|
list_views: {
|
|
34
18
|
title: "List views",
|
|
35
|
-
description: `
|
|
36
|
-
|
|
37
|
-
To show it: a plain list in app order.`,
|
|
19
|
+
description: `Lists every view in app order with its type (normal or dev) and a dev view's person: "what views are there". Use it to learn view names for find_tasks, list_projects, or count_tasks. More: help topic list_views.`,
|
|
38
20
|
},
|
|
39
21
|
list_projects: {
|
|
40
22
|
title: "List projects",
|
|
41
|
-
description: `
|
|
42
|
-
|
|
43
|
-
To show it: a plain list in app order.`,
|
|
23
|
+
description: `Lists the projects in one view, or in every view, in app order: "what projects are in Inbox". Closed ones hidden unless asked. Not for what's inside a project (find_tasks) or a project name in an unknown view (resolve). More: help topic list_projects.`,
|
|
44
24
|
},
|
|
45
25
|
get_workspace_info: {
|
|
46
26
|
title: "Workspace info",
|
|
47
|
-
description: `
|
|
48
|
-
|
|
49
|
-
To show it: usually don't; use it to answer the question.`,
|
|
27
|
+
description: `Today's date, who you act as, members, statuses with types, priorities in order, the week start, and page limits. Call once per chat before using status, priority, or date words. More: help topic get_workspace_info.`,
|
|
50
28
|
},
|
|
51
29
|
resolve: {
|
|
52
30
|
title: "Resolve a name",
|
|
53
|
-
description: `
|
|
54
|
-
|
|
55
|
-
Use it for "which To Do project", "is there a status called Review", "Hassan's user ID". Do not call it when the name is already unique and known, because find_tasks, count_tasks, and list_projects resolve names themselves and return the same candidates when a name is ambiguous. Example: {"type":"project","name":"To Do"}
|
|
56
|
-
|
|
57
|
-
To show it: when several match, ask which one by name and where it sits.`,
|
|
31
|
+
description: `Turns a name into an ID when you're not sure it's unique or spelled the workspace's way: a member, view, project, milestone, status, or priority. Returns one ID, candidates with where each sits, or none. Not needed for a known, unique name: the other tools resolve names themselves. More: help topic resolve.`,
|
|
58
32
|
},
|
|
59
33
|
find_timecards: {
|
|
60
34
|
title: "Find timecards",
|
|
61
|
-
description: `
|
|
62
|
-
|
|
63
|
-
Use it for "show me Hassan's timecards today", "show me every timecard on the Stripe migration milestone", "Hassan's unpaid timecards last week", "who is clocked in right now" (running_only=true). Do not use it for hours per person, per day, per week, or per task, or for "what did Hassan work on" (use sum_time), or to read the task itself (use get_task).
|
|
64
|
-
|
|
65
|
-
person is a user ID, a member name, or "me"; there is no "none", because every timecard has a person. A name that is no longer a member but still has timecards resolves and is marked former_member. task, milestone, and project take an alpha-ID or a name; a match means the row is on that item or on anything under it, and closed, cancelled, and archived items always count, so there is no include_completed. A row whose task was deleted shows "(no task)" and still counts. A name matching several things returns candidates and no rows; pass the alpha-ID.
|
|
66
|
-
|
|
67
|
-
from and to are YYYY-MM-DD in America/Detroit, inclusive; a row belongs to the day its timer started, whole, even if it ran past midnight. Both absent means all time. The server never turns "today" or "this week" into dates: read today and week_start from get_workspace_info, then pass Monday to Sunday; for example, today 2026-09-09 makes this week from 2026-09-07 to 2026-09-13. status values: any (default), paid, unpaid; unpaid includes rows whose status was never set. A running timer has no end and no hours and adds zero to every total; running_count says how many there are.
|
|
68
|
-
|
|
69
|
-
Nothing searches notes; they are returned on each row. Rates, pay periods, approvals, estimates, and other workspaces are not available. Example: {"person":"Hassan","from":"2026-09-09","to":"2026-09-09"}
|
|
70
|
-
|
|
71
|
-
To show it: group by day, or a table of task and hours when one day.`,
|
|
35
|
+
description: `Lists timecards (time entries) by person, task, milestone, project, dates, and paid status: "Hassan's timecards today", "unpaid timecards last week", "who is clocked in right now" (running_only). Not for hours per person, day, week, or task, or for "what did Hassan work on" (use sum_time). More: help topic find_timecards (dates, running timers, former members).`,
|
|
72
36
|
},
|
|
73
37
|
sum_time: {
|
|
74
38
|
title: "Sum time",
|
|
75
|
-
description: `
|
|
76
|
-
|
|
77
|
-
Use it for "what did Hassan work on last week" (group_by milestone), "how many hours did Hassan work today", "hours per person this week", "hours per week in August", "which milestones in Estimating have the most time", "unpaid hours per person". Do not use it to see the timecards themselves (use find_timecards). Dates are YYYY-MM-DD; read today and week_start from get_workspace_info first. Example: {"person":"Daniyal","from":"2026-08-01","to":"2026-08-31","group_by":"week"}
|
|
78
|
-
|
|
79
|
-
To show it: a small table with a total row; for "what did X work on", fold the milestones into 3 to 8 themes (payments, deployments, proposal fixes) with hours and a total row, and show tasks (group_by task) or timecards (find_timecards) only when asked.`,
|
|
39
|
+
description: `Sums hours over timecards with the same filters as find_timecards, optionally grouped by person, day, week, task, milestone, or project: "hours Hassan worked today", "hours per person this week", "what did Hassan work on last week" (group_by milestone). Exact, never capped. Not for the timecards themselves (find_timecards). More: help topic sum_time.`,
|
|
80
40
|
},
|
|
81
41
|
find_comments: {
|
|
82
42
|
title: "Find comments",
|
|
83
|
-
description: `
|
|
84
|
-
|
|
85
|
-
Use it for "what has Hassan commented on this week", "which comments mention me", "what's been said in the Payments project since Monday", "find comments that say iPad", "which tasks have the most comments" (count_by task), "comments per person last week" (count_by person), and for the older comments of a long thread: get_task shows a task's newest comments and gives a cursor for the rest. Do not use it to read one task's recent comments (get_task does that) or to search task names (find_tasks).
|
|
86
|
-
|
|
87
|
-
task takes an alpha-ID or a name at any level and returns that item's own comments; pass include_descendants=true for everything under it too. person is the author; mentions is someone mentioned, or "any". Both take a user ID, a member name, or "me". A name matching several people returns candidates and no rows; pass the user ID.
|
|
88
|
-
|
|
89
|
-
from and to are YYYY-MM-DD America/Detroit days, inclusive, by when the comment was posted; read today from get_workspace_info. text is one case-insensitive substring of the comment text only. edited_only=true keeps edited comments. count_by values: none (default), task, person; it adds exact counts for the whole match, highest first, and rows still come back.
|
|
90
|
-
|
|
91
|
-
Comments on closed tasks always count. Comments on a task in the trash never appear. Deleted comments and an edited comment's earlier text are gone. Example: {"person":"Hassan","from":"2026-09-29","to":"2026-10-05"}
|
|
92
|
-
|
|
93
|
-
To show it: group by task; who, when, and the text for each.`,
|
|
43
|
+
description: `Finds comments on tasks by task, author, mention, date, or a word: "what has Hassan commented on this week", "comments that mention me", "comments that say iPad", "which tasks have the most comments" (count_by task), and a long thread's older comments. Not for one task's recent comments (get_task) or task names (find_tasks). More: help topic find_comments.`,
|
|
94
44
|
},
|
|
95
45
|
create_task: {
|
|
96
46
|
title: "Create task",
|
|
97
|
-
description: `
|
|
98
|
-
|
|
99
|
-
placement says where it goes: {"position":"top"|"bottom"|"before"|"after","item":"alpha-N"} among the milestone's tasks for a task; for a milestone, its spot in a dev view section, with "view" (a dev view or its person, default the first assignee's) and "group_by" ("status", the default, or "priority"). placement is required for a task and for an assigned milestone. Never choose it yourself: unless the person said "at the bottom" or "wherever", read the neighbors first (find_tasks with view, group_by, group, level=milestone, sort=view_order for a section; get_task with include_siblings for a milestone's tasks), show them, and ask. A subtask goes to the bottom when placement is left out. A milestone always goes to the bottom of its project.
|
|
100
|
-
|
|
101
|
-
children is a list of {name, assignees, status, priority, start_date, end_date, description, estimated_hours, children}, one level below each parent, created in the order given. Children don't inherit assignees; name them. As in the app, an item whose children have estimates shows their sum as its own estimate. Everything is created or nothing is. One call makes at most 25 items, children included; split a bigger request. Example: {"parent":"alpha-4608","name":"Rotate the API keys","assignees":["Hassan"],"end_date":"2026-10-09","placement":{"position":"bottom"}}
|
|
102
|
-
|
|
103
|
-
This app can't turn a task into a milestone or a subtask, or the other way round. Offer to create a new item and trash the old one instead.
|
|
104
|
-
|
|
105
|
-
To show it: one sentence saying what was created, where, and for whom.`,
|
|
47
|
+
description: `Creates a milestone, task, or subtask under a parent (a project makes a milestone, a milestone a task, a task a subtask), optionally with children: at most 25 items per call, all or nothing. placement is required for a task and an assigned milestone. Never choose it yourself: unless the person said "at the bottom" or "wherever", show the neighbors and ask. This app can't turn a task into a milestone or a subtask, or the other way round. Offer to create a new item and trash the old one instead. More: help topic create_task.`,
|
|
106
48
|
},
|
|
107
49
|
update_task: {
|
|
108
50
|
title: "Update task",
|
|
109
|
-
description: `
|
|
110
|
-
|
|
111
|
-
Assignees change by add_assignees and remove_assignees, never by replacing the list, so people nobody mentioned stay. Only active members can be added; a bot or someone no longer in the workspace is refused. description replaces the whole text; to add a line, read it with get_task and send the full new text. estimated_hours is a number of hours, decimals allowed; 0 clears it. A milestone or task whose estimate adds up its children's can't be set by hand; change a child's estimate instead.
|
|
112
|
-
|
|
113
|
-
When a milestone's new status or priority puts it in another section of a dev view, it goes to the bottom of that section; pass placement ({"position":"top"|"bottom"|"before"|"after","item":"alpha-N","view":"Hassan"}) to put it somewhere else. To reorder without changing a field, use place_task. To give it a new parent, use move_task. Example: {"task":"alpha-5201","status":"In Progress"}
|
|
114
|
-
|
|
115
|
-
To show it: one sentence naming the item and what changed.`,
|
|
51
|
+
description: `Changes fields on one milestone, task, or subtask: name, status, priority, assignees (added or removed, never replaced), dates, description (replaces the whole text), estimated hours. Pass only what changes. To reorder, use place_task; for a new parent, move_task; for one change to many items, bulk_update_tasks. More: help topic update_task.`,
|
|
116
52
|
},
|
|
117
53
|
place_task: {
|
|
118
54
|
title: "Place task",
|
|
119
|
-
description: `
|
|
120
|
-
|
|
121
|
-
A task or subtask moves among its parent's children. That order is the same in every view. A task has no spot of its own in a dev view section: it sits under its milestone. If the person asks for a task at the top of someone's section, move the task to the top of its milestone, say so, and offer to move the milestone.
|
|
122
|
-
|
|
123
|
-
A milestone moves inside its section of a dev view: pass "view" (the dev view or its person; default its first assignee's) and "group_by" ("status", the default, or "priority"). The two groupings keep separate orders; moving in one leaves the other alone. It stays in its section; to move it to another section, change its status or priority with update_task.
|
|
124
|
-
|
|
125
|
-
"Make this the first thing Hassan works on" about a task is two calls: the task to the top of its milestone, then the milestone to the top of Hassan's section in the status grouping. Say both. Never choose a spot yourself: read the section with find_tasks (view, group_by, group, level=milestone, sort=view_order) or the milestone with get_task (include_siblings), show it, and ask. Example: {"task":"alpha-5201","placement":{"position":"bottom","view":"Hassan","group_by":"priority"}}
|
|
126
|
-
|
|
127
|
-
To show it: one sentence saying where it is now.`,
|
|
55
|
+
description: `Moves one item to a new spot without changing anything else: a task among its milestone's tasks, or a milestone within its dev view section. Never choose the spot yourself: show the list and ask. "First thing Hassan works on" about a task is two calls. To save a whole list's order, use set_order. More: help topic place_task.`,
|
|
128
56
|
},
|
|
129
57
|
set_order: {
|
|
130
58
|
title: "Set order",
|
|
131
|
-
description: `
|
|
132
|
-
|
|
133
|
-
Work out the order yourself from a read, then send the whole list. For a section, read it with find_tasks (view, group_by, group, level=milestone, sort=view_order), paging with the cursor until you have every row; for children, read the item with get_task. Never guess or sort by a field you didn't read. "These five first" means those five, then everyone else in their current order. The list must hold exactly the open items in the list: one missing or extra is refused, with both named, and nothing changes. Closed items you don't name stay after the others.
|
|
134
|
-
|
|
135
|
-
It changes order only: no field, activity, or notification. The answer gives the old order; to undo, send it back. To move one item, use place_task. Example: {"view":"Hassan","group_by":"status","group":"To Do","order":["alpha-5201","alpha-4608"]}
|
|
136
|
-
|
|
137
|
-
To show it: one sentence naming the list, how many moved, and what is first now.`,
|
|
59
|
+
description: `Saves the full order of one list in one call: a dev view section or one item's children, up to 100 alpha-IDs. Read the list first and send every open item; one missing or extra is refused and nothing changes. Order only; the answer gives the old order, to undo. For one item, use place_task. More: help topic set_order.`,
|
|
138
60
|
},
|
|
139
61
|
bulk_update_tasks: {
|
|
140
62
|
title: "Bulk update tasks",
|
|
141
|
-
description: `
|
|
142
|
-
|
|
143
|
-
Up to 10 items, the change applies right away. Above 10, the first call changes nothing and returns a preview (how many change, how many already have it, which milestones move to another section, who gets notified) and a confirm_token. Show the person the whole preview and ask. Only after they say yes, call again with the same items, the same change, and the confirm_token. Never confirm in the same turn as the preview. The code works once, for that list and change, for 10 minutes; if anything changed, you get a new preview.
|
|
144
|
-
|
|
145
|
-
Milestones that move to another section go to its bottom in list order; to reorder after, use set_order. For one item, or a rename, description, or estimate, use update_task. Example: {"items":["alpha-5201","alpha-4608"],"status":"Snoozed"}
|
|
146
|
-
|
|
147
|
-
To show it: one sentence with the change and how many; for a preview, the preview as a short list, then the question.`,
|
|
63
|
+
description: `Applies one change (assignees, status, priority, dates) to up to 100 items in one call. Up to 10 apply at once. Above 10, the first call only previews and returns a confirm_token: show the preview, wait for a yes, and never confirm in the same turn. For one item, a rename, a description, or an estimate, use update_task. More: help topic bulk_update_tasks.`,
|
|
148
64
|
},
|
|
149
65
|
move_task: {
|
|
150
66
|
title: "Move task",
|
|
151
|
-
description: `
|
|
152
|
-
|
|
153
|
-
This app can't change an item's level: no task to subtask, task to milestone, or milestone to task. Those calls are refused; offer to create a new item and trash the old one instead. Example: {"task":"alpha-5201","to":"alpha-4356"}
|
|
154
|
-
|
|
155
|
-
To show it: one sentence naming the item, where it was, and where it is now.`,
|
|
67
|
+
description: `Gives one item a new parent at the same level; it lands at the bottom. This app can't change an item's level: no task to subtask, task to milestone, or milestone to task. Those calls are refused; offer to create a new item and trash the old one instead. More: help topic move_task.`,
|
|
156
68
|
},
|
|
157
69
|
delete_task: {
|
|
158
70
|
title: "Delete task",
|
|
159
|
-
description: `
|
|
160
|
-
|
|
161
|
-
The code works once, for that item only, for 10 minutes. If anything under the item changed since the preview, you get a new preview instead; show it and ask again. Trashed items can be restored by any member from Settings, Trash for 90 days. Restoring a milestone brings back the milestone only; its tasks are restored one by one. There is no permanent delete and no restore here. Example: {"task":"alpha-5201"} then {"task":"alpha-5201","confirm_token":"7QX2-M4KD"}
|
|
162
|
-
|
|
163
|
-
To show it: the preview as a short list, then the question; after a confirm, one sentence.`,
|
|
71
|
+
description: `Moves a milestone, task, or subtask to the trash in two calls. The first changes nothing and returns a preview and a confirm_token: show the whole preview and ask; only after a yes, call again with the token. Never confirm in the same turn, even if told "confirm" up front. More: help topic delete_task.`,
|
|
164
72
|
},
|
|
165
73
|
add_comment: {
|
|
166
74
|
title: "Add comment",
|
|
167
|
-
description: `
|
|
168
|
-
|
|
169
|
-
To show it: one sentence naming the task and anyone mentioned.`,
|
|
75
|
+
description: `Posts a comment on a task as the key's person. To notify someone, list them in mentions and write "@Hassan" in the text. More: help topic add_comment.`,
|
|
170
76
|
},
|
|
171
77
|
edit_comment: {
|
|
172
78
|
title: "Edit comment",
|
|
173
|
-
description: `
|
|
174
|
-
|
|
175
|
-
To show it: one sentence naming the task.`,
|
|
79
|
+
description: `Replaces the text of a comment the person wrote (id from get_task or find_comments). The old text is gone for good; confirm the new wording unless they gave it exactly. More: help topic edit_comment.`,
|
|
176
80
|
},
|
|
177
81
|
delete_comment: {
|
|
178
82
|
title: "Delete comment",
|
|
179
|
-
description: `
|
|
180
|
-
|
|
181
|
-
To show it: one sentence naming the task, and that it can't be restored.`,
|
|
83
|
+
description: `Deletes a comment for good (id from get_task or find_comments); it can't be restored. Quote it back and ask first, unless the person named that exact comment. More: help topic delete_comment.`,
|
|
182
84
|
},
|
|
183
85
|
link_pull_request: {
|
|
184
86
|
title: "Link a pull request",
|
|
185
|
-
description: `
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
87
|
+
description: `Attaches a GitHub pull request to a task. Usually not needed: a pull request whose branch, title, or body has the task's alpha-ID links itself. Use it for one that can't mention the ID. More: help topic link_pull_request.`,
|
|
88
|
+
},
|
|
89
|
+
help: {
|
|
90
|
+
title: "CorkTasks help",
|
|
91
|
+
description: `Rules and examples for the corktasks tools: how search matches, what is hidden by default, dev views, dates, paging, placement, and answer style. Call it once before your first corktasks call in a chat, and with a topic before a tool you haven't used or after an error.`,
|
|
190
92
|
},
|
|
191
93
|
};
|
|
192
94
|
//# sourceMappingURL=descriptions.js.map
|
package/dist/descriptions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../src/descriptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../src/descriptions.ts"],"names":[],"mappings":"AAwBA,2GAA2G;AAC3G,gGAAgG;AAChG,gDAAgD;AAChD,MAAM,CAAC,MAAM,YAAY,GAA6D;IACpF,UAAU,EAAE;QACV,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,6gBAA6gB;KAC3hB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,kUAAkU;KAChV;IACD,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EAAE,yMAAyM;KACvN;IACD,cAAc,EAAE;QACd,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,iMAAiM;KAC/M;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,+NAA+N;KAC7O;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,+QAA+Q;KAC7R;CACF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getApiKey, getConvexUrl } from "./auth.js";
|
|
|
4
4
|
import { initClient } from "./client.js";
|
|
5
5
|
import { buildServer } from "./instructions.js";
|
|
6
6
|
initClient(getConvexUrl(), getApiKey());
|
|
7
|
-
const server = buildServer("0.
|
|
7
|
+
const server = buildServer("0.8.0");
|
|
8
8
|
const transport = new StdioServerTransport();
|
|
9
9
|
await server.connect(transport);
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/instructions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
export declare const INSTRUCTIONS = "corktasks is CorkCRM's project-management app. These tools read and change its tasks and comments, read its timecards, and can link a pull request to a task.\n\nBefore answering:\n-
|
|
2
|
+
export declare const INSTRUCTIONS = "corktasks is CorkCRM's project-management app. These tools read and change its tasks and comments, read its timecards, and can link a pull request to a task.\n\nBefore answering:\n- First use in a chat: call help once. Before a tool you haven't used, or after an error: help with that topic.\n- Call get_workspace_info once: today's date, people, statuses, priorities.\n- \"What is X working on\": find_tasks with view X, group \"In Progress\", level milestone. Use assignee only for \"X's open tasks\".\n\nHow to show answers:\n- Use first names (\"Hassan\"), full names only when two people share one.\n- Keep each line's [ID] for follow-up calls. Don't show an ID unless the person asks for one. Link the task name to the task's page instead.\n- Lists in app order: group tasks under their project and milestone as headings, one line per task: status, priority, due date.\n- \"What's due\" and \"what's overdue\": one table sorted by date: task, due date, status, person.\n- Hours, counts: a small table with a total.\n- \"What did X work on\": sum_time by milestone, as 3 to 8 themes (payments, deployments) with hours and a total. Tasks or timecards only when asked.\n- Say the total and anything hidden in one sentence. Long lists: the summary and first 25, then offer more.\n- Never invent a task, person, date, or number no tool returned.\n\nChanging things:\n- Change only what the person asked for.\n- For a whole list (an order, or one change to many items), use set_order or bulk_update_tasks, not one call per item.\n- Never pick a spot alone. For a new task or milestone, unless they said \"at the bottom\" or \"wherever\", show the milestone's tasks or the section's milestones and ask where it goes.\n- \"First thing Hassan works on\" about a task: move the task to the top of its milestone, then the milestone to the top of his section. Say both.\n- Before any delete, or a bulk change over 10 items, show the whole preview and wait for a yes. Never confirm in the same turn.\n- After a change, say what changed in one sentence.";
|
|
3
3
|
/** The server with its instructions and every tool registered; index.ts connects it to stdio. */
|
|
4
4
|
export declare function buildServer(version: string): McpServer;
|
package/dist/instructions.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import { registerTools } from "./tools.js";
|
|
3
3
|
// What the server tells the client on connect: how to read the tools and how to show their answers.
|
|
4
|
-
// Approved October 7, 2026 (option 2 of the project's presentation recommendation). Keep under 2,
|
|
4
|
+
// Approved October 7, 2026 (option 2 of the project's presentation recommendation). Keep under 2,048 characters, so
|
|
5
|
+
// Claude Code keeps every line (it cuts server instructions at 2,048; Shorter Tool List design, October 12, 2026).
|
|
6
|
+
// The less frequent answer style lives in the help tool's "answers" topic.
|
|
5
7
|
export const INSTRUCTIONS = `corktasks is CorkCRM's project-management app. These tools read and change its tasks and comments, read its timecards, and can link a pull request to a task.
|
|
6
8
|
|
|
7
9
|
Before answering:
|
|
8
|
-
-
|
|
10
|
+
- First use in a chat: call help once. Before a tool you haven't used, or after an error: help with that topic.
|
|
11
|
+
- Call get_workspace_info once: today's date, people, statuses, priorities.
|
|
9
12
|
- "What is X working on": find_tasks with view X, group "In Progress", level milestone. Use assignee only for "X's open tasks".
|
|
10
13
|
|
|
11
14
|
How to show answers:
|
|
12
15
|
- Use first names ("Hassan"), full names only when two people share one.
|
|
13
|
-
-
|
|
16
|
+
- Keep each line's [ID] for follow-up calls. Don't show an ID unless the person asks for one. Link the task name to the task's page instead.
|
|
14
17
|
- Lists in app order: group tasks under their project and milestone as headings, one line per task: status, priority, due date.
|
|
15
18
|
- "What's due" and "what's overdue": one table sorted by date: task, due date, status, person.
|
|
16
19
|
- Hours, counts: a small table with a total.
|
|
17
20
|
- "What did X work on": sum_time by milestone, as 3 to 8 themes (payments, deployments) with hours and a total. Tasks or timecards only when asked.
|
|
18
|
-
-
|
|
19
|
-
- Dates within a week: "Tuesday", "last Thursday"; else as written. Times are Eastern.
|
|
20
|
-
- Say the total and anything hidden in one sentence. A long list is a summary plus the first 25: show both, say how many more, offer the rest, never the next-page code.
|
|
21
|
+
- Say the total and anything hidden in one sentence. Long lists: the summary and first 25, then offer more.
|
|
21
22
|
- Never invent a task, person, date, or number no tool returned.
|
|
22
23
|
|
|
23
24
|
Changing things:
|
package/dist/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,oGAAoG;AACpG,
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,oGAAoG;AACpG,oHAAoH;AACpH,mHAAmH;AACnH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;oDAuBwB,CAAC;AAErD,iGAAiG;AACjG,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,EAC9B,EAAE,YAAY,EAAE,YAAY,EAAE,CAC/B,CAAC;IACF,aAAa,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -16,71 +16,71 @@ export const SORTS = [
|
|
|
16
16
|
export const GROUP_BYS = ["status", "priority"];
|
|
17
17
|
export const COUNT_BYS = ["none", "view", "assignee", "status", "priority", "level"];
|
|
18
18
|
export const RESOLVE_TYPES = ["member", "view", "project", "milestone", "status", "priority"];
|
|
19
|
-
const ymd = (field, meaning) => z.string().describe(`${meaning}, YYYY-MM-DD inclusive
|
|
19
|
+
const ymd = (field, meaning) => z.string().describe(`${meaning}, YYYY-MM-DD, inclusive.`);
|
|
20
20
|
const includeCompleted = z
|
|
21
21
|
.boolean()
|
|
22
|
-
.describe("Also
|
|
22
|
+
.describe("Also completed and cancelled rows.");
|
|
23
23
|
const includeArchived = z
|
|
24
24
|
.boolean()
|
|
25
|
-
.describe("Also
|
|
25
|
+
.describe("Also rows closed 180+ days ago.");
|
|
26
26
|
const viewArg = z
|
|
27
27
|
.string()
|
|
28
|
-
.describe("View
|
|
29
|
-
const cursorArg = z.string().describe("
|
|
28
|
+
.describe("View name or ID, or a dev view's person. Default: all.");
|
|
29
|
+
const cursorArg = z.string().describe("From the previous page.");
|
|
30
30
|
const limitArg = (defaultLimit) => z
|
|
31
31
|
.number({ invalid_type_error: "limit must be an integer from 1 to 200" })
|
|
32
32
|
.int("limit must be an integer from 1 to 200")
|
|
33
33
|
.min(1, "limit must be an integer from 1 to 200")
|
|
34
34
|
.max(200, "limit must be an integer from 1 to 200")
|
|
35
|
-
.describe(`
|
|
35
|
+
.describe(`1 to 200, default ${defaultLimit}.`);
|
|
36
36
|
export const filterShape = {
|
|
37
37
|
assignee: z
|
|
38
38
|
.string()
|
|
39
|
-
.describe("Member name, user ID, `me
|
|
39
|
+
.describe("Member name, user ID, `me`, or `none` (unassigned)."),
|
|
40
40
|
status: z
|
|
41
41
|
.string()
|
|
42
|
-
.describe("Status name
|
|
42
|
+
.describe("Status name; a closed status returns closed rows."),
|
|
43
43
|
status_type: z
|
|
44
44
|
.array(z.enum(STATUS_TYPES))
|
|
45
|
-
.describe("
|
|
45
|
+
.describe("A closed type returns closed rows."),
|
|
46
46
|
priority: z
|
|
47
47
|
.string()
|
|
48
|
-
.describe("Priority name
|
|
48
|
+
.describe("Priority name, `none`, or `highest`."),
|
|
49
49
|
view: viewArg,
|
|
50
50
|
project: z
|
|
51
51
|
.string()
|
|
52
|
-
.describe("
|
|
52
|
+
.describe("alpha-N, ID, or name; every row under it. Pass view too if the name repeats."),
|
|
53
53
|
milestone: z
|
|
54
54
|
.string()
|
|
55
|
-
.describe("
|
|
56
|
-
parent: z.string().describe("
|
|
55
|
+
.describe("alpha-N, ID, or name; every row under it."),
|
|
56
|
+
parent: z.string().describe("alpha-N or ID; direct children only, in order."),
|
|
57
57
|
level: z
|
|
58
58
|
.enum(LEVELS)
|
|
59
|
-
.describe("
|
|
59
|
+
.describe("`tasks`: task, subtask, or no level. Default: all."),
|
|
60
60
|
start_from: ymd("start date", "Earliest start date"),
|
|
61
61
|
start_to: ymd("start date", "Latest start date"),
|
|
62
62
|
end_from: ymd("end date", "Earliest end (due) date"),
|
|
63
63
|
end_to: ymd("end date", "Latest end (due) date"),
|
|
64
|
-
completed_from: ymd("completion date", "Earliest completion day (
|
|
65
|
-
completed_to: ymd("completion date", "Latest completion day (
|
|
66
|
-
text: z.string().describe("
|
|
67
|
-
name: z.string().describe("
|
|
68
|
-
description: z.string().describe("
|
|
64
|
+
completed_from: ymd("completion date", "Earliest completion day (implies completed)"),
|
|
65
|
+
completed_to: ymd("completion date", "Latest completion day (implies completed)"),
|
|
66
|
+
text: z.string().describe("Substring of name or description, case-insensitive."),
|
|
67
|
+
name: z.string().describe("Substring of name; an alpha-N is an exact ID match."),
|
|
68
|
+
description: z.string().describe("Substring of description."),
|
|
69
69
|
include_completed: includeCompleted,
|
|
70
70
|
include_archived: includeArchived,
|
|
71
71
|
group_by: z
|
|
72
72
|
.enum(GROUP_BYS)
|
|
73
|
-
.describe("Dev views
|
|
73
|
+
.describe("Dev views: milestone status (default) or priority."),
|
|
74
74
|
group: z
|
|
75
75
|
.string()
|
|
76
|
-
.describe("Dev views
|
|
76
|
+
.describe("Dev views: one status or priority group, or `none`."),
|
|
77
77
|
};
|
|
78
78
|
export const findTasksSchema = z
|
|
79
79
|
.object({
|
|
80
80
|
...filterShape,
|
|
81
81
|
sort: z
|
|
82
82
|
.enum(SORTS)
|
|
83
|
-
.describe("
|
|
83
|
+
.describe("Default view_order (app order); empty values sort last."),
|
|
84
84
|
cursor: cursorArg,
|
|
85
85
|
limit: limitArg(50),
|
|
86
86
|
})
|
|
@@ -92,24 +92,24 @@ export const getTaskSchema = z
|
|
|
92
92
|
id: z
|
|
93
93
|
.string({ required_error: "id is required: a Convex ID or alpha-N" })
|
|
94
94
|
.min(1, "id is required: a Convex ID or alpha-N")
|
|
95
|
-
.describe("
|
|
95
|
+
.describe("alpha-N or Convex ID."),
|
|
96
96
|
include_siblings: z
|
|
97
97
|
.boolean()
|
|
98
98
|
.optional()
|
|
99
|
-
.describe("Also
|
|
99
|
+
.describe("Also the parent's children in order, this one marked."),
|
|
100
100
|
include_completed: includeCompleted
|
|
101
101
|
.optional()
|
|
102
|
-
.describe("Also
|
|
102
|
+
.describe("Also closed children and siblings."),
|
|
103
103
|
include_archived: includeArchived
|
|
104
104
|
.optional()
|
|
105
|
-
.describe("Also
|
|
105
|
+
.describe("Also those closed 180+ days ago."),
|
|
106
106
|
comment_limit: z
|
|
107
107
|
.number({ invalid_type_error: COMMENT_LIMIT_MESSAGE })
|
|
108
108
|
.int(COMMENT_LIMIT_MESSAGE)
|
|
109
109
|
.min(0, COMMENT_LIMIT_MESSAGE)
|
|
110
110
|
.max(50, COMMENT_LIMIT_MESSAGE)
|
|
111
111
|
.optional()
|
|
112
|
-
.describe("Newest comments
|
|
112
|
+
.describe("Newest comments, 0 to 50, default 10."),
|
|
113
113
|
})
|
|
114
114
|
.strict();
|
|
115
115
|
export const countTasksSchema = z
|
|
@@ -117,7 +117,7 @@ export const countTasksSchema = z
|
|
|
117
117
|
...filterShape,
|
|
118
118
|
count_by: z
|
|
119
119
|
.enum(COUNT_BYS)
|
|
120
|
-
.describe("
|
|
120
|
+
.describe("Default none."),
|
|
121
121
|
})
|
|
122
122
|
.partial()
|
|
123
123
|
.strict();
|
|
@@ -137,55 +137,48 @@ export const resolveSchema = z
|
|
|
137
137
|
.object({
|
|
138
138
|
type: z.enum(RESOLVE_TYPES, {
|
|
139
139
|
required_error: "type is required: member, view, project, milestone, status, or priority",
|
|
140
|
-
}).describe("What the name is
|
|
140
|
+
}).describe("What the name is."),
|
|
141
141
|
name: z
|
|
142
142
|
.string({ required_error: "name is required" })
|
|
143
143
|
.min(1, "name is required")
|
|
144
|
-
.describe("
|
|
144
|
+
.describe("Full name first, then substring; case-insensitive."),
|
|
145
145
|
view: z
|
|
146
146
|
.string()
|
|
147
147
|
.optional()
|
|
148
|
-
.describe("
|
|
148
|
+
.describe("Narrows a project or milestone to this view."),
|
|
149
149
|
project: z
|
|
150
150
|
.string()
|
|
151
151
|
.optional()
|
|
152
|
-
.describe("
|
|
152
|
+
.describe("Narrows a milestone to this project."),
|
|
153
153
|
})
|
|
154
154
|
.strict();
|
|
155
155
|
// Timecard tools. The three lists are copied from read/constants.ts too.
|
|
156
156
|
export const TIME_STATUSES = ["any", "paid", "unpaid"];
|
|
157
157
|
export const TIME_SORTS = ["start_asc", "start_desc"];
|
|
158
158
|
export const TIME_GROUP_BYS = ["none", "person", "day", "week", "task", "milestone", "project"];
|
|
159
|
-
const timeDay = (which
|
|
160
|
-
.string()
|
|
161
|
-
.describe(`${which} day, YYYY-MM-DD in America/Detroit, inclusive; a row belongs to the day its timer started. ` +
|
|
162
|
-
`Never a word like today: read today from get_workspace_info. Example: ${example}.`);
|
|
159
|
+
const timeDay = (which) => z.string().describe(`${which} day, YYYY-MM-DD, Detroit, inclusive.`);
|
|
163
160
|
export const timecardFilterShape = {
|
|
164
|
-
person: z
|
|
165
|
-
.string()
|
|
166
|
-
.describe("Member name, user ID, or `me`; a former member who still has timecards also resolves. No `none`: every timecard has a person. Example: Hassan."),
|
|
161
|
+
person: z.string().describe("Member name, user ID, or `me`. Example: Hassan."),
|
|
167
162
|
task: z
|
|
168
163
|
.string()
|
|
169
|
-
.describe("
|
|
170
|
-
milestone: z
|
|
171
|
-
.string()
|
|
172
|
-
.describe("Milestone by alpha-N or name; rows on it and on everything under it. Resolved inside project when both are given. Example: Estimates v2 bugs and fixes round 2."),
|
|
164
|
+
.describe("alpha-N or name; rows on it and its subtasks. Example: alpha-1216."),
|
|
165
|
+
milestone: z.string().describe("alpha-N or name; rows on everything under it."),
|
|
173
166
|
project: z
|
|
174
167
|
.string()
|
|
175
|
-
.describe("
|
|
176
|
-
from: timeDay("Earliest"
|
|
177
|
-
to: timeDay("Latest"
|
|
168
|
+
.describe("alpha-N or name; rows on everything under it."),
|
|
169
|
+
from: timeDay("Earliest"),
|
|
170
|
+
to: timeDay("Latest"),
|
|
178
171
|
status: z
|
|
179
172
|
.enum(TIME_STATUSES)
|
|
180
|
-
.describe("any
|
|
173
|
+
.describe("Default any; unpaid includes never set."),
|
|
181
174
|
running_only: z
|
|
182
175
|
.boolean()
|
|
183
|
-
.describe("
|
|
176
|
+
.describe("Only timers with no end. Default false."),
|
|
184
177
|
};
|
|
185
178
|
export const findTimecardsSchema = z
|
|
186
179
|
.object({
|
|
187
180
|
...timecardFilterShape,
|
|
188
|
-
sort: z.enum(TIME_SORTS).describe("start_asc (
|
|
181
|
+
sort: z.enum(TIME_SORTS).describe("Default start_asc (oldest first)."),
|
|
189
182
|
cursor: cursorArg,
|
|
190
183
|
limit: limitArg(50),
|
|
191
184
|
})
|
|
@@ -196,7 +189,7 @@ export const sumTimeSchema = z
|
|
|
196
189
|
...timecardFilterShape,
|
|
197
190
|
group_by: z
|
|
198
191
|
.enum(TIME_GROUP_BYS)
|
|
199
|
-
.describe("none
|
|
192
|
+
.describe("Default none; a week runs Monday to Sunday."),
|
|
200
193
|
})
|
|
201
194
|
.partial()
|
|
202
195
|
.strict();
|
|
@@ -204,39 +197,36 @@ export const sumTimeSchema = z
|
|
|
204
197
|
export const COMMENT_SORTS = ["newest", "oldest"];
|
|
205
198
|
export const COMMENT_COUNT_BYS = ["none", "task", "person"];
|
|
206
199
|
const COMMENT_TEXT_MESSAGE = "text must be 1 to 200 characters";
|
|
207
|
-
const commentDay = (which
|
|
208
|
-
.string()
|
|
209
|
-
.describe(`${which} day the comment was posted, YYYY-MM-DD in America/Detroit, inclusive. ` +
|
|
210
|
-
`Never a word like today: read today from get_workspace_info. Example: ${example}.`);
|
|
200
|
+
const commentDay = (which) => z.string().describe(`${which} day posted, YYYY-MM-DD, Detroit, inclusive.`);
|
|
211
201
|
export const findCommentsSchema = z
|
|
212
202
|
.object({
|
|
213
203
|
task: z
|
|
214
204
|
.string()
|
|
215
|
-
.describe("
|
|
205
|
+
.describe("alpha-N or name, any level; that item's own comments."),
|
|
216
206
|
include_descendants: z
|
|
217
207
|
.boolean()
|
|
218
|
-
.describe("With task: also
|
|
208
|
+
.describe("With task: also comments on everything under it."),
|
|
219
209
|
person: z
|
|
220
210
|
.string()
|
|
221
|
-
.describe("
|
|
211
|
+
.describe("Author: member name, user ID, or `me`."),
|
|
222
212
|
mentions: z
|
|
223
213
|
.string()
|
|
224
|
-
.describe("Someone mentioned:
|
|
225
|
-
from: commentDay("Earliest"
|
|
226
|
-
to: commentDay("Latest"
|
|
214
|
+
.describe("Someone mentioned: name, user ID, `me`, or `any`."),
|
|
215
|
+
from: commentDay("Earliest"),
|
|
216
|
+
to: commentDay("Latest"),
|
|
227
217
|
text: z
|
|
228
218
|
.string()
|
|
229
219
|
.min(1, COMMENT_TEXT_MESSAGE)
|
|
230
220
|
.max(200, COMMENT_TEXT_MESSAGE)
|
|
231
|
-
.describe("
|
|
232
|
-
edited_only: z.boolean().describe("
|
|
221
|
+
.describe("Substring of the comment text. Example: iPad."),
|
|
222
|
+
edited_only: z.boolean().describe("Only edited comments."),
|
|
233
223
|
count_by: z
|
|
234
224
|
.enum(COMMENT_COUNT_BYS)
|
|
235
|
-
.describe("
|
|
236
|
-
sort: z.enum(COMMENT_SORTS).describe("newest
|
|
225
|
+
.describe("Adds exact counts; rows still come back."),
|
|
226
|
+
sort: z.enum(COMMENT_SORTS).describe("Default newest; oldest reads a thread top down."),
|
|
237
227
|
cursor: z
|
|
238
228
|
.string()
|
|
239
|
-
.describe("
|
|
229
|
+
.describe("From the previous page, or comments_cursor from get_task."),
|
|
240
230
|
limit: limitArg(50),
|
|
241
231
|
})
|
|
242
232
|
.partial()
|
|
@@ -246,7 +236,7 @@ export const linkPullRequestSchema = z
|
|
|
246
236
|
task: z
|
|
247
237
|
.string({ required_error: "task is required: a Convex ID or alpha-N" })
|
|
248
238
|
.min(1, "task is required: a Convex ID or alpha-N")
|
|
249
|
-
.describe("
|
|
239
|
+
.describe("alpha-N or Convex ID."),
|
|
250
240
|
pull_request_url: z.string().url().describe("https://github.com/{owner}/{repo}/pull/{number}"),
|
|
251
241
|
})
|
|
252
242
|
.strict();
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AACjF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAC5F,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,EAA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5D,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IAC1D,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,iBAAiB,CAAC;SACvB,QAAQ,CAAC,0CAA0C,CAAC;IACvD,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IACvF,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,CAAC,2DAA2D,CAAC;IACxE,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;CACpB,CAAC;KACD,OAAO,EAAE;KACT,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAAC;IACN,IAAI,EAAE,CAAC;SACJ,MAAM,CAAC,EAAE,cAAc,EAAE,0CAA0C,EAAE,CAAC;SACtE,GAAG,CAAC,CAAC,EAAE,0CAA0C,CAAC;SAClD,QAAQ,CAAC,uBAAuB,CAAC;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;CAC/F,CAAC;KACD,MAAM,EAAE,CAAC"}
|
package/dist/tools.js
CHANGED
|
@@ -4,6 +4,7 @@ import { formatCounts, formatError, formatLinkPullRequest, formatList, formatRes
|
|
|
4
4
|
import { formatFindComments } from "./formatComments.js";
|
|
5
5
|
import { formatDeleteTask } from "./formatDelete.js";
|
|
6
6
|
import { formatAddComment, formatBulkUpdate, formatCreateTask, formatDeleteComment, formatEditComment, formatMoveTask, formatPlaceTask, formatSetOrder, formatUpdateTask, } from "./formatWrites.js";
|
|
7
|
+
import { helpSchema, helpText } from "./help.js";
|
|
7
8
|
import { PAGE_ROWS, summarize } from "./longList.js";
|
|
8
9
|
import { formatSumTime, formatTimecards } from "./formatTime.js";
|
|
9
10
|
import { countTasksSchema, findCommentsSchema, findTasksSchema, findTimecardsSchema, getTaskSchema, linkPullRequestSchema, listProjectsSchema, listViewsSchema, resolveSchema, sumTimeSchema, workspaceInfoSchema, } from "./schemas.js";
|
|
@@ -120,12 +121,23 @@ const TOOLS = [
|
|
|
120
121
|
annotations: write(false, true, true),
|
|
121
122
|
format: (data) => formatLinkPullRequest(data),
|
|
122
123
|
},
|
|
124
|
+
{
|
|
125
|
+
name: "help",
|
|
126
|
+
schema: helpSchema,
|
|
127
|
+
format: () => "",
|
|
128
|
+
local: (args) => helpText(args.topic ?? "start"),
|
|
129
|
+
},
|
|
123
130
|
];
|
|
124
131
|
export const TOOL_NAMES = TOOLS.map((t) => t.name);
|
|
125
132
|
async function run(tool, args) {
|
|
133
|
+
if (tool.local) {
|
|
134
|
+
const text = tool.local(args);
|
|
135
|
+
return { content: [{ type: "text", text }], structuredContent: { text } };
|
|
136
|
+
}
|
|
126
137
|
const result = await callTool(tool.name, args);
|
|
127
138
|
if (!result.ok) {
|
|
128
|
-
|
|
139
|
+
// A wrong argument points Claude at the tool's help topic (Shorter Tool List design).
|
|
140
|
+
const text = formatError(result.error) + (result.error.code === "bad_argument" ? `\nSee help topic ${tool.name}.` : "");
|
|
129
141
|
return { content: [{ type: "text", text }], structuredContent: { text, error: result.error }, isError: true };
|
|
130
142
|
}
|
|
131
143
|
let body = result.data;
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAiB,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,mBAAmB,GAQpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAA2B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAqB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,GAUjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,eAAe,EAA6C,MAAM,iBAAiB,CAAC;AAC5G,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAiB,MAAM,mBAAmB,CAAC;AAChE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,qBAAqB,EACrB,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,mBAAmB,GAQpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAA2B,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAqB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,GAUjB,MAAM,mBAAmB,C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,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACxH,CAAC;IACD,wEAAwE;IACxE,yEAAyE;IACzE,2BAA2B;IAC3B,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAI,IAAgC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;KACnG,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAiB;IAC7C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,YAAY,CACjB,IAAI,CAAC,IAAI,EACT,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,WAAW,EAAE,EAC9F,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAY,CAAC,CAClC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/writeSchemas.js
CHANGED
|
@@ -15,8 +15,8 @@ const name = z
|
|
|
15
15
|
const ymd = (meaning) => z.string().describe(`${meaning}, YYYY-MM-DD, for example 2026-10-09.`);
|
|
16
16
|
const ymdOrNone = (meaning) => z.string().describe(`${meaning}, YYYY-MM-DD, or "none" to clear.`);
|
|
17
17
|
const people = (meaning) => z.array(z.string()).describe(`${meaning}: member names, user IDs, or "me".`);
|
|
18
|
-
const status = z.string().describe('A status name
|
|
19
|
-
const priority = z.string().describe('A priority name
|
|
18
|
+
const status = z.string().describe('A status name, for example "In Progress".');
|
|
19
|
+
const priority = z.string().describe('A priority name, for example "P1", or "none".');
|
|
20
20
|
const description = z.string().describe("Plain text or markdown.");
|
|
21
21
|
const HOURS_MAX = 10_000;
|
|
22
22
|
const hours = (meaning) => z
|
|
@@ -28,7 +28,7 @@ const commentText = z
|
|
|
28
28
|
.string()
|
|
29
29
|
.min(1, `text must be 1 to ${COMMENT_MAX.toLocaleString("en-US")} characters`)
|
|
30
30
|
.max(COMMENT_MAX, `text must be 1 to ${COMMENT_MAX.toLocaleString("en-US")} characters`);
|
|
31
|
-
const mentions = z.array(z.string()).describe('People to notify
|
|
31
|
+
const mentions = z.array(z.string()).describe('People to notify; write "@Hassan" in the text.');
|
|
32
32
|
const commentId = z
|
|
33
33
|
.string({ required_error: "comment is required: the comment's id from get_task or find_comments" })
|
|
34
34
|
.min(1, "comment is required: the comment's id from get_task or find_comments")
|
|
@@ -57,19 +57,19 @@ const grandchild = z.object(childFields).strict();
|
|
|
57
57
|
const child = z.object({ ...childFields, children: z.array(grandchild).optional() }).strict();
|
|
58
58
|
export const createTaskSchema = z
|
|
59
59
|
.object({
|
|
60
|
-
parent: taskId("parent", "the project, milestone, or task it
|
|
60
|
+
parent: taskId("parent", "the project, milestone, or task above it"),
|
|
61
61
|
...childFields,
|
|
62
62
|
level: z.enum(["milestone", "task", "subtask"]).optional().describe("Implied by the parent; checked when given."),
|
|
63
63
|
placement: placementSchema.optional(),
|
|
64
64
|
children: z
|
|
65
65
|
.array(child)
|
|
66
66
|
.optional()
|
|
67
|
-
.describe("Items one level below,
|
|
67
|
+
.describe("Items one level below, in order; 25 items per call at most."),
|
|
68
68
|
})
|
|
69
69
|
.strict();
|
|
70
70
|
export const updateTaskSchema = z
|
|
71
71
|
.object({
|
|
72
|
-
task: taskId("task", "the milestone, task, or subtask
|
|
72
|
+
task: taskId("task", "the milestone, task, or subtask"),
|
|
73
73
|
name: name.optional(),
|
|
74
74
|
status: status.optional(),
|
|
75
75
|
priority: priority.optional(),
|
|
@@ -84,7 +84,7 @@ export const updateTaskSchema = z
|
|
|
84
84
|
.strict();
|
|
85
85
|
export const placeTaskSchema = z
|
|
86
86
|
.object({
|
|
87
|
-
task: taskId("task", "the item to reorder
|
|
87
|
+
task: taskId("task", "the item to reorder"),
|
|
88
88
|
placement: placementSchema,
|
|
89
89
|
})
|
|
90
90
|
.strict();
|
|
@@ -93,14 +93,14 @@ export const placeTaskSchema = z
|
|
|
93
93
|
// over_limit from the route, not a schema error.
|
|
94
94
|
export const setOrderSchema = z
|
|
95
95
|
.object({
|
|
96
|
-
view: z.string().optional().describe("A dev view section: the
|
|
96
|
+
view: z.string().optional().describe("A dev view section: the view, its ID, or its person."),
|
|
97
97
|
group_by: z.enum(GROUP_BYS).optional().describe("With view: status (default) or priority."),
|
|
98
|
-
group: z.string().optional().describe('With view: a status
|
|
99
|
-
parent: z.string().optional().describe("Instead of view: a milestone
|
|
98
|
+
group: z.string().optional().describe('With view: a status or priority name, or "none".'),
|
|
99
|
+
parent: z.string().optional().describe("Instead of view: a milestone or task, for its children."),
|
|
100
100
|
order: z
|
|
101
101
|
.array(z.string())
|
|
102
102
|
.min(1, "order is required: every item in the list, as alpha-IDs, in the new order")
|
|
103
|
-
.describe("Every item in the list, as alpha-IDs, in the new order
|
|
103
|
+
.describe("Every item in the list, as alpha-IDs, in the new order."),
|
|
104
104
|
})
|
|
105
105
|
.strict();
|
|
106
106
|
// bulk_update_tasks: one set of changes for many items. Duplicates, "at least one change", and the cap
|
|
@@ -120,7 +120,7 @@ export const bulkUpdateTasksSchema = z
|
|
|
120
120
|
items: z
|
|
121
121
|
.array(z.string())
|
|
122
122
|
.min(1, "items is required: the alpha-IDs to change, 1 to 100")
|
|
123
|
-
.describe("The
|
|
123
|
+
.describe("The items to change, as alpha-IDs."),
|
|
124
124
|
add_assignees: people("People to add").optional(),
|
|
125
125
|
remove_assignees: people("People to remove").optional(),
|
|
126
126
|
status: status.optional(),
|
|
@@ -134,19 +134,19 @@ export const bulkUpdateTasksSchema = z
|
|
|
134
134
|
.strict();
|
|
135
135
|
export const moveTaskSchema = z
|
|
136
136
|
.object({
|
|
137
|
-
task: taskId("task", "the item to move
|
|
138
|
-
to: taskId("to", "the new parent
|
|
137
|
+
task: taskId("task", "the item to move"),
|
|
138
|
+
to: taskId("to", "the new parent"),
|
|
139
139
|
})
|
|
140
140
|
.strict();
|
|
141
141
|
export const deleteTaskSchema = z
|
|
142
142
|
.object({
|
|
143
|
-
task: taskId("task", "the item to trash
|
|
143
|
+
task: taskId("task", "the item to trash"),
|
|
144
144
|
confirm_token: z.string().optional().describe("The code from this item's preview, for example 7QX2-M4KD."),
|
|
145
145
|
})
|
|
146
146
|
.strict();
|
|
147
147
|
export const addCommentSchema = z
|
|
148
148
|
.object({
|
|
149
|
-
task: taskId("task", "the task
|
|
149
|
+
task: taskId("task", "the task"),
|
|
150
150
|
text: commentText.describe(`The comment, 1 to ${COMMENT_MAX.toLocaleString("en-US")} characters, markdown.`),
|
|
151
151
|
mentions: mentions.optional(),
|
|
152
152
|
})
|
package/dist/writeSchemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeSchemas.js","sourceRoot":"","sources":["../src/writeSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,kFAAkF;AAClF,oGAAoG;AAEpG,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,kBAAkB;AAE9C,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAC/C,CAAC;KACE,MAAM,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,uCAAuC,EAAE,CAAC;KAC1E,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,uCAAuC,CAAC;KACtD,QAAQ,CAAC,2BAA2B,OAAO,GAAG,CAAC,CAAC;AAErD,MAAM,IAAI,GAAG,CAAC;KACX,MAAM,EA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AAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE;CAC9B,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "corkcrm-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "MCP server for corktasks.com (CorkCRM PM)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/corkcrm/corkcrm-pm.git",
|
|
10
|
+
"directory": "mcp"
|
|
11
|
+
},
|
|
7
12
|
"bin": {
|
|
8
13
|
"corkcrm-mcp": "./dist/index.js"
|
|
9
14
|
},
|