@studiometa/productive-mcp 0.10.1 → 0.10.3
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 +25 -13
- package/dist/formatters.d.ts +1 -0
- package/dist/formatters.d.ts.map +1 -1
- package/dist/handlers/activities.d.ts +26 -0
- package/dist/handlers/activities.d.ts.map +1 -0
- package/dist/handlers/deals.d.ts.map +1 -1
- package/dist/handlers/factory.d.ts.map +1 -1
- package/dist/handlers/help.d.ts.map +1 -1
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/projects.d.ts +1 -1
- package/dist/handlers/projects.d.ts.map +1 -1
- package/dist/handlers/services.d.ts.map +1 -1
- package/dist/handlers/summaries.d.ts +18 -0
- package/dist/handlers/summaries.d.ts.map +1 -0
- package/dist/handlers/tasks.d.ts.map +1 -1
- package/dist/handlers/time.d.ts.map +1 -1
- package/dist/handlers/types.d.ts +1 -0
- package/dist/handlers/types.d.ts.map +1 -1
- package/dist/handlers/valid-includes.d.ts +20 -0
- package/dist/handlers/valid-includes.d.ts.map +1 -0
- package/dist/handlers/workflows.d.ts +35 -0
- package/dist/handlers/workflows.d.ts.map +1 -0
- package/dist/{handlers-DWowqxFA.js → handlers-CaOBYauF.js} +997 -304
- package/dist/handlers-CaOBYauF.js.map +1 -0
- package/dist/handlers.js +1 -1
- package/dist/hints.d.ts +9 -0
- package/dist/hints.d.ts.map +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/schema.d.ts +20 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/stdio.js +1 -1
- package/dist/suggestions.d.ts +44 -0
- package/dist/suggestions.d.ts.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +2 -1
- package/dist/tools.js.map +1 -1
- package/dist/{version-DoRPyhTL.js → version-BRTaTnUG.js} +2 -2
- package/dist/{version-DoRPyhTL.js.map → version-BRTaTnUG.js.map} +1 -1
- package/package.json +3 -3
- package/skills/SKILL.md +139 -16
- package/dist/handlers-DWowqxFA.js.map +0 -1
package/dist/schema.d.ts
CHANGED
|
@@ -27,8 +27,11 @@ export declare const ResourceSchema: z.ZodEnum<{
|
|
|
27
27
|
attachments: "attachments";
|
|
28
28
|
discussions: "discussions";
|
|
29
29
|
pages: "pages";
|
|
30
|
+
activities: "activities";
|
|
30
31
|
batch: "batch";
|
|
32
|
+
workflows: "workflows";
|
|
31
33
|
reports: "reports";
|
|
34
|
+
summaries: "summaries";
|
|
32
35
|
search: "search";
|
|
33
36
|
}>;
|
|
34
37
|
/**
|
|
@@ -44,11 +47,18 @@ export declare const ActionSchema: z.ZodEnum<{
|
|
|
44
47
|
delete: "delete";
|
|
45
48
|
resolve: "resolve";
|
|
46
49
|
stop: "stop";
|
|
50
|
+
context: "context";
|
|
47
51
|
reopen: "reopen";
|
|
48
52
|
run: "run";
|
|
49
53
|
me: "me";
|
|
54
|
+
complete_task: "complete_task";
|
|
55
|
+
log_day: "log_day";
|
|
56
|
+
weekly_standup: "weekly_standup";
|
|
50
57
|
help: "help";
|
|
51
58
|
schema: "schema";
|
|
59
|
+
my_day: "my_day";
|
|
60
|
+
project_health: "project_health";
|
|
61
|
+
team_pulse: "team_pulse";
|
|
52
62
|
}>;
|
|
53
63
|
/**
|
|
54
64
|
* Report types available in Productive.io
|
|
@@ -166,8 +176,11 @@ export declare const ProductiveToolInputSchema: z.ZodObject<{
|
|
|
166
176
|
attachments: "attachments";
|
|
167
177
|
discussions: "discussions";
|
|
168
178
|
pages: "pages";
|
|
179
|
+
activities: "activities";
|
|
169
180
|
batch: "batch";
|
|
181
|
+
workflows: "workflows";
|
|
170
182
|
reports: "reports";
|
|
183
|
+
summaries: "summaries";
|
|
171
184
|
search: "search";
|
|
172
185
|
}>;
|
|
173
186
|
action: z.ZodEnum<{
|
|
@@ -179,11 +192,18 @@ export declare const ProductiveToolInputSchema: z.ZodObject<{
|
|
|
179
192
|
delete: "delete";
|
|
180
193
|
resolve: "resolve";
|
|
181
194
|
stop: "stop";
|
|
195
|
+
context: "context";
|
|
182
196
|
reopen: "reopen";
|
|
183
197
|
run: "run";
|
|
184
198
|
me: "me";
|
|
199
|
+
complete_task: "complete_task";
|
|
200
|
+
log_day: "log_day";
|
|
201
|
+
weekly_standup: "weekly_standup";
|
|
185
202
|
help: "help";
|
|
186
203
|
schema: "schema";
|
|
204
|
+
my_day: "my_day";
|
|
205
|
+
project_health: "project_health";
|
|
206
|
+
team_pulse: "team_pulse";
|
|
187
207
|
}>;
|
|
188
208
|
id: z.ZodOptional<z.ZodString>;
|
|
189
209
|
filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,CAAC,EAAoB,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAGlF,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAMhF;;;GAGG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,CAAC,EAAoB,KAAK,kBAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAC;AAGlF,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAMhF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;EAAkB,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,gBAA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M,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAErE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAAC,mBAAmB,CAAC,CAE7F;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAOnF"}
|
package/dist/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
3
|
-
import "./handlers-
|
|
2
|
+
import { t as VERSION } from "./version-BRTaTnUG.js";
|
|
3
|
+
import "./handlers-CaOBYauF.js";
|
|
4
4
|
import { createHttpApp } from "./http.js";
|
|
5
5
|
import { toNodeListener } from "h3";
|
|
6
6
|
import { createServer } from "node:http";
|
package/dist/stdio.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as executeToolWithCredentials } from "./handlers-
|
|
1
|
+
import { t as executeToolWithCredentials } from "./handlers-CaOBYauF.js";
|
|
2
2
|
import "./handlers.js";
|
|
3
3
|
import { STDIO_ONLY_TOOLS, TOOLS } from "./tools.js";
|
|
4
4
|
import { getConfig, setConfig } from "@studiometa/productive-api";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proactive suggestion generators for MCP responses.
|
|
3
|
+
*
|
|
4
|
+
* Data-aware warnings and recommendations computed from response data.
|
|
5
|
+
* Different from `_hints` (which show related resources/actions):
|
|
6
|
+
* - `_hints` tell the agent *what to fetch next*
|
|
7
|
+
* - `_suggestions` tell the agent *what to pay attention to*
|
|
8
|
+
*
|
|
9
|
+
* Key design constraints:
|
|
10
|
+
* - No extra API calls — compute only from data already in the response.
|
|
11
|
+
* - Return `string[]` (human-readable messages).
|
|
12
|
+
* - Emoji prefixes: ⚠️ warnings, ℹ️ info, 📊 stats, ⏱️ timers.
|
|
13
|
+
*/
|
|
14
|
+
import type { JsonApiResource } from '@studiometa/productive-api';
|
|
15
|
+
import type { MyDaySummaryResult } from '@studiometa/productive-core';
|
|
16
|
+
/**
|
|
17
|
+
* Get suggestions for tasks.list response.
|
|
18
|
+
*
|
|
19
|
+
* - Warns about overdue tasks (due_date < today and not closed)
|
|
20
|
+
* - Informs about unassigned tasks
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTaskListSuggestions(tasks: JsonApiResource[]): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Get suggestions for tasks.get response.
|
|
25
|
+
*
|
|
26
|
+
* - Warns if the single task is overdue (and by how many days)
|
|
27
|
+
* - Informs if no time has been logged (only when time_entries are included)
|
|
28
|
+
*/
|
|
29
|
+
export declare function getTaskGetSuggestions(task: JsonApiResource, included?: JsonApiResource[]): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Get suggestions for time.list response.
|
|
32
|
+
*
|
|
33
|
+
* - Shows total hours logged across all entries in the response.
|
|
34
|
+
* - If filtered by today, shows hours vs 8h target.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getTimeListSuggestions(entries: JsonApiResource[], filter?: Record<string, string>): string[];
|
|
37
|
+
/**
|
|
38
|
+
* Get suggestions for summaries.my_day response.
|
|
39
|
+
*
|
|
40
|
+
* - Warns if no time has been logged today.
|
|
41
|
+
* - Warns if a timer has been running for more than 2 hours.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getMyDaySuggestions(data: MyDaySummaryResult): string[];
|
|
44
|
+
//# sourceMappingURL=suggestions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suggestions.d.ts","sourceRoot":"","sources":["../src/suggestions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAStE;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,MAAM,EAAE,CAqCzE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,eAAe,EACrB,QAAQ,CAAC,EAAE,eAAe,EAAE,GAC3B,MAAM,EAAE,CAkCV;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,MAAM,EAAE,CAwBV;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAoBtE"}
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAwB/D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK,EAAE,IAAI,EAsGvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,IAAI,EAoClC,CAAC"}
|
package/dist/tools.js
CHANGED
|
@@ -14,7 +14,8 @@ function generateDescription() {
|
|
|
14
14
|
"Output: compact=false for full detail (default for get; list defaults true).",
|
|
15
15
|
"Search: query for text search on list actions. Cross-resource: resource=search action=run with query searches projects, companies, people, tasks simultaneously.",
|
|
16
16
|
"Reports: resource=reports action=get with report_type, from, to.",
|
|
17
|
-
"Batch: resource=batch action=run with operations=[{resource,action,...}] executes up to 10 ops in parallel."
|
|
17
|
+
"Batch: resource=batch action=run with operations=[{resource,action,...}] executes up to 10 ops in parallel.",
|
|
18
|
+
"Rich context: action=context on tasks/projects/deals for full context in one call."
|
|
18
19
|
].join("\n");
|
|
19
20
|
}
|
|
20
21
|
/**
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","names":[],"sources":["../src/tools.ts"],"sourcesContent":["import type { Tool } from '@modelcontextprotocol/sdk/types.js';\n\nimport { RESOURCES, ACTIONS, REPORT_TYPES } from '@studiometa/productive-core';\n\n/**\n * Generate the tool description dynamically from the constants.\n * Adding a resource or action to constants.ts automatically updates this description.\n */\nfunction generateDescription(): string {\n return [\n 'Productive.io API.',\n `Resources: ${RESOURCES.join(', ')}.`,\n `Actions: ${ACTIONS.join(', ')} (varies by resource).`,\n 'Discovery: action=help with any resource for filters, fields, examples. action=schema for compact machine-readable spec.',\n 'Filters: filter:{key:value}. Common: project_id, person_id, after/before (YYYY-MM-DD).',\n 'Includes: include:[...] for related data (e.g. [\"project\",\"assignee\"]).',\n 'Output: compact=false for full detail (default for get; list defaults true).',\n 'Search: query for text search on list actions. Cross-resource: resource=search action=run with query searches projects, companies, people, tasks simultaneously.',\n 'Reports: resource=reports action=get with report_type, from, to.',\n 'Batch: resource=batch action=run with operations=[{resource,action,...}] executes up to 10 ops in parallel.',\n ].join('\\n');\n}\n\n/**\n * Single consolidated tool for Productive.io MCP server\n *\n * The resource/action/report_type enums and description are derived from\n * the shared constants in constants.ts — the single source of truth for both\n * the MCP tool definition and the Zod validation schemas.\n * Adding a new resource, action, or report type there automatically updates\n * both the tool exposed to clients and the validation layer.\n *\n * MCP Annotations (for MCP directory compliance):\n * - readOnlyHint: false - Tool can create/update data\n * - destructiveHint: false - Tool does not permanently delete data\n * - idempotentHint: false - Create actions are not idempotent\n * - openWorldHint: true - Tool interacts with external Productive.io API\n */\nexport const TOOLS: Tool[] = [\n {\n name: 'productive',\n description: generateDescription(),\n annotations: {\n title: 'Productive.io',\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n },\n inputSchema: {\n type: 'object',\n properties: {\n resource: {\n type: 'string',\n enum: [...RESOURCES],\n },\n action: {\n type: 'string',\n enum: [...ACTIONS],\n description: 'Use \"help\" for resource documentation',\n },\n id: { type: 'string' },\n filter: { type: 'object' },\n page: { type: 'number' },\n per_page: { type: 'number' },\n compact: {\n type: 'boolean',\n description: 'Compact output (default: true for list, false for get)',\n },\n include: {\n type: 'array',\n items: { type: 'string' },\n description: 'Related data to include (e.g. [\"project\",\"assignee\"])',\n },\n query: { type: 'string', description: 'Text search for list actions' },\n resources: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Resource types to search (for resource=search). Defaults to [projects, companies, people, tasks]. Valid values: projects, companies, people, tasks, deals.',\n },\n // Common fields\n person_id: { type: 'string' },\n service_id: { type: 'string' },\n task_id: { type: 'string' },\n company_id: { type: 'string' },\n time: { type: 'number' },\n date: { type: 'string' },\n note: { type: 'string' },\n // Task fields\n title: { type: 'string' },\n project_id: { type: 'string' },\n task_list_id: { type: 'string' },\n description: { type: 'string' },\n assignee_id: { type: 'string' },\n // Company fields\n name: { type: 'string' },\n // Page fields\n page_id: { type: 'string', description: 'Page ID (list pages to find)' },\n parent_page_id: { type: 'string', description: 'Parent page ID for sub-pages' },\n // Comment fields\n body: { type: 'string', description: 'Comment/page body content' },\n deal_id: { type: 'string' },\n // Attachment fields\n comment_id: { type: 'string', description: 'Comment ID (for attachments)' },\n // Timer fields\n time_entry_id: { type: 'string' },\n // Booking fields\n started_on: { type: 'string', description: 'Booking date (YYYY-MM-DD)' },\n ended_on: { type: 'string', description: 'Booking end date (YYYY-MM-DD)' },\n event_id: { type: 'string' },\n // Report fields\n report_type: {\n type: 'string',\n enum: [...REPORT_TYPES],\n description: 'Required for resource=reports action=get',\n },\n group: { type: 'string', description: 'Report grouping: person, project, service' },\n from: { type: 'string', description: 'Report start (YYYY-MM-DD); filter.after for time' },\n to: { type: 'string', description: 'Report end (YYYY-MM-DD); filter.before for time' },\n status: { type: 'string' },\n // Batch fields\n operations: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n resource: { type: 'string' },\n action: { type: 'string' },\n },\n required: ['resource', 'action'],\n },\n maxItems: 10,\n description:\n 'Array of operations for batch execution (max 10). Each operation needs resource, action, and any additional params.',\n },\n },\n required: ['resource', 'action'],\n },\n },\n];\n\n/**\n * Additional tools only available in stdio mode (local execution)\n * These tools manage persistent configuration\n */\nexport const STDIO_ONLY_TOOLS: Tool[] = [\n {\n name: 'productive_configure',\n description: 'Configure Productive.io credentials',\n annotations: {\n title: 'Configure Productive',\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n inputSchema: {\n type: 'object',\n properties: {\n organizationId: { type: 'string' },\n apiToken: { type: 'string' },\n userId: { type: 'string' },\n },\n required: ['organizationId', 'apiToken'],\n },\n },\n {\n name: 'productive_get_config',\n description: 'Get current configuration',\n annotations: {\n title: 'Get Productive Config',\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n];\n"],"mappings":";;;;;AAQA,SAAS,sBAA8B;AACrC,QAAO;EACL;EACA,cAAc,UAAU,KAAK,KAAK,CAAC;EACnC,YAAY,QAAQ,KAAK,KAAK,CAAC;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;AAkBd,MAAa,QAAgB,CAC3B;CACE,MAAM;CACN,aAAa,qBAAqB;CAClC,aAAa;EACX,OAAO;EACP,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EAChB;CACD,aAAa;EACX,MAAM;EACN,YAAY;GACV,UAAU;IACR,MAAM;IACN,MAAM,CAAC,GAAG,UAAU;IACrB;GACD,QAAQ;IACN,MAAM;I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;IAAU,aAAa;IAA6C;GACnF,MAAM;IAAE,MAAM;IAAU,aAAa;IAAoD;GACzF,IAAI;IAAE,MAAM;IAAU,aAAa;IAAmD;GACtF,QAAQ,EAAE,MAAM,UAAU;GAE1B,YAAY;IACV,MAAM;IACN,OAAO;KACL,MAAM;KACN,YAAY;MACV,UAAU,EAAE,MAAM,UAAU;MAC5B,QAAQ,EAAE,MAAM,UAAU;MAC3B;KACD,UAAU,CAAC,YAAY,SAAS;KACjC;IACD,UAAU;IACV,aACE;IACH;GACF;EACD,UAAU,CAAC,YAAY,SAAS;EACjC;CACF,CACF;;;;;AAMD,MAAa,mBAA2B,CACtC;CACE,MAAM;CACN,aAAa;CACb,aAAa;EACX,OAAO;EACP,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EAChB;CACD,aAAa;EACX,MAAM;EACN,YAAY;GACV,gBAAgB,EAAE,MAAM,UAAU;GAClC,UAAU,EAAE,MAAM,UAAU;GAC5B,QAAQ,EAAE,MAAM,UAAU;GAC3B;EACD,UAAU,CAAC,kBAAkB,WAAW;EACzC;CACF,EACD;CACE,MAAM;CACN,aAAa;CACb,aAAa;EACX,OAAO;EACP,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EAChB;CACD,aAAa;EACX,MAAM;EACN,YAAY,EAAE;EACf;CACF,CACF"}
|
|
1
|
+
{"version":3,"file":"tools.js","names":[],"sources":["../src/tools.ts"],"sourcesContent":["import type { Tool } from '@modelcontextprotocol/sdk/types.js';\n\nimport { RESOURCES, ACTIONS, REPORT_TYPES } from '@studiometa/productive-core';\n\n/**\n * Generate the tool description dynamically from the constants.\n * Adding a resource or action to constants.ts automatically updates this description.\n */\nfunction generateDescription(): string {\n return [\n 'Productive.io API.',\n `Resources: ${RESOURCES.join(', ')}.`,\n `Actions: ${ACTIONS.join(', ')} (varies by resource).`,\n 'Discovery: action=help with any resource for filters, fields, examples. action=schema for compact machine-readable spec.',\n 'Filters: filter:{key:value}. Common: project_id, person_id, after/before (YYYY-MM-DD).',\n 'Includes: include:[...] for related data (e.g. [\"project\",\"assignee\"]).',\n 'Output: compact=false for full detail (default for get; list defaults true).',\n 'Search: query for text search on list actions. Cross-resource: resource=search action=run with query searches projects, companies, people, tasks simultaneously.',\n 'Reports: resource=reports action=get with report_type, from, to.',\n 'Batch: resource=batch action=run with operations=[{resource,action,...}] executes up to 10 ops in parallel.',\n 'Rich context: action=context on tasks/projects/deals for full context in one call.',\n ].join('\\n');\n}\n\n/**\n * Single consolidated tool for Productive.io MCP server\n *\n * The resource/action/report_type enums and description are derived from\n * the shared constants in constants.ts — the single source of truth for both\n * the MCP tool definition and the Zod validation schemas.\n * Adding a new resource, action, or report type there automatically updates\n * both the tool exposed to clients and the validation layer.\n *\n * MCP Annotations (for MCP directory compliance):\n * - readOnlyHint: false - Tool can create/update data\n * - destructiveHint: false - Tool does not permanently delete data\n * - idempotentHint: false - Create actions are not idempotent\n * - openWorldHint: true - Tool interacts with external Productive.io API\n */\nexport const TOOLS: Tool[] = [\n {\n name: 'productive',\n description: generateDescription(),\n annotations: {\n title: 'Productive.io',\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: false,\n openWorldHint: true,\n },\n inputSchema: {\n type: 'object',\n properties: {\n resource: {\n type: 'string',\n enum: [...RESOURCES],\n },\n action: {\n type: 'string',\n enum: [...ACTIONS],\n description: 'Use \"help\" for resource documentation',\n },\n id: { type: 'string' },\n filter: { type: 'object' },\n page: { type: 'number' },\n per_page: { type: 'number' },\n compact: {\n type: 'boolean',\n description: 'Compact output (default: true for list, false for get)',\n },\n include: {\n type: 'array',\n items: { type: 'string' },\n description: 'Related data to include (e.g. [\"project\",\"assignee\"])',\n },\n query: { type: 'string', description: 'Text search for list actions' },\n resources: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Resource types to search (for resource=search). Defaults to [projects, companies, people, tasks]. Valid values: projects, companies, people, tasks, deals.',\n },\n // Common fields\n person_id: { type: 'string' },\n service_id: { type: 'string' },\n task_id: { type: 'string' },\n company_id: { type: 'string' },\n time: { type: 'number' },\n date: { type: 'string' },\n note: { type: 'string' },\n // Task fields\n title: { type: 'string' },\n project_id: { type: 'string' },\n task_list_id: { type: 'string' },\n description: { type: 'string' },\n assignee_id: { type: 'string' },\n // Company fields\n name: { type: 'string' },\n // Page fields\n page_id: { type: 'string', description: 'Page ID (list pages to find)' },\n parent_page_id: { type: 'string', description: 'Parent page ID for sub-pages' },\n // Comment fields\n body: { type: 'string', description: 'Comment/page body content' },\n deal_id: { type: 'string' },\n // Attachment fields\n comment_id: { type: 'string', description: 'Comment ID (for attachments)' },\n // Timer fields\n time_entry_id: { type: 'string' },\n // Booking fields\n started_on: { type: 'string', description: 'Booking date (YYYY-MM-DD)' },\n ended_on: { type: 'string', description: 'Booking end date (YYYY-MM-DD)' },\n event_id: { type: 'string' },\n // Report fields\n report_type: {\n type: 'string',\n enum: [...REPORT_TYPES],\n description: 'Required for resource=reports action=get',\n },\n group: { type: 'string', description: 'Report grouping: person, project, service' },\n from: { type: 'string', description: 'Report start (YYYY-MM-DD); filter.after for time' },\n to: { type: 'string', description: 'Report end (YYYY-MM-DD); filter.before for time' },\n status: { type: 'string' },\n // Batch fields\n operations: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n resource: { type: 'string' },\n action: { type: 'string' },\n },\n required: ['resource', 'action'],\n },\n maxItems: 10,\n description:\n 'Array of operations for batch execution (max 10). Each operation needs resource, action, and any additional params.',\n },\n },\n required: ['resource', 'action'],\n },\n },\n];\n\n/**\n * Additional tools only available in stdio mode (local execution)\n * These tools manage persistent configuration\n */\nexport const STDIO_ONLY_TOOLS: Tool[] = [\n {\n name: 'productive_configure',\n description: 'Configure Productive.io credentials',\n annotations: {\n title: 'Configure Productive',\n readOnlyHint: false,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n inputSchema: {\n type: 'object',\n properties: {\n organizationId: { type: 'string' },\n apiToken: { type: 'string' },\n userId: { type: 'string' },\n },\n required: ['organizationId', 'apiToken'],\n },\n },\n {\n name: 'productive_get_config',\n description: 'Get current configuration',\n annotations: {\n title: 'Get Productive Config',\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n },\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n];\n"],"mappings":";;;;;AAQA,SAAS,sBAA8B;AACrC,QAAO;EACL;EACA,cAAc,UAAU,KAAK,KAAK,CAAC;EACnC,YAAY,QAAQ,KAAK,KAAK,CAAC;EAC/B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC,KAAK,KAAK;;;;;;;;;;;;;;;;;AAkBd,MAAa,QAAgB,CAC3B;CACE,MAAM;CACN,aAAa,qBAAqB;CAClC,aAAa;EACX,OAAO;EACP,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EAChB;CACD,aAAa;EACX,MAAM;EACN,YAAY;GACV,UAAU;IACR,MAAM;IACN,MAAM,CAAC,GAAG,UAAU;IACrB;GACD,QAAQ;IACN,MAAM;IACN,MAAM,CAAC,GAAG,QAAQ;IAClB,aAAa;IACd;GACD,IAAI,EAAE,MAAM,UAAU;GACtB,QAAQ,EAAE,MAAM,UAAU;GAC1B,MAAM,EAAE,MAAM,UAAU;GACxB,UAAU,EAAE,MAAM,UAAU;GAC5B,SAAS;IACP,MAAM;IACN,aAAa;IACd;GACD,SAAS;IACP,MAAM;IACN,OAAO,EAAE,MAAM,UAAU;IACzB,aAAa;IACd;GACD,OAAO;IAAE,MAAM;IAAU,aAAa;IAAgC;GACtE,WAAW;IACT,MAAM;IACN,OAAO,EAAE,MAAM,UAAU;IACzB,aACE;IACH;GAED,WAAW,EAAE,MAAM,UAAU;GAC7B,YAAY,EAAE,MAAM,UAAU;GAC9B,SAAS,EAAE,MAAM,UAAU;GAC3B,YAAY,EAAE,MAAM,UAAU;GAC9B,MAAM,EAAE,MAAM,UAAU;GACxB,MAAM,EAAE,MAAM,UAAU;GACxB,MAAM,EAAE,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MAAM,UAAU;GAC5B,QAAQ,EAAE,MAAM,UAAU;GAC3B;EACD,UAAU,CAAC,kBAAkB,WAAW;EACzC;CACF,EACD;CACE,MAAM;CACN,aAAa;CACb,aAAa;EACX,OAAO;EACP,cAAc;EACd,iBAAiB;EACjB,gBAAgB;EAChB,eAAe;EAChB;CACD,aAAa;EACX,MAAM;EACN,YAAY,EAAE;EACf;CACF,CACF"}
|
|
@@ -23,7 +23,7 @@ function loadInstructions() {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
const INSTRUCTIONS = loadInstructions();
|
|
26
|
-
const VERSION = "0.10.
|
|
26
|
+
const VERSION = "0.10.3";
|
|
27
27
|
export { INSTRUCTIONS as n, VERSION as t };
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=version-
|
|
29
|
+
//# sourceMappingURL=version-BRTaTnUG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-BRTaTnUG.js","names":[],"sources":["../src/instructions.ts","../src/version.ts"],"sourcesContent":["/**\n * MCP Server Instructions\n *\n * These instructions are sent to Claude Desktop during initialization\n * and used as context/hints for the LLM. This ensures the AI agent\n * knows how to properly use the Productive.io MCP server.\n *\n * The content is derived from skills/SKILL.md (without YAML frontmatter).\n */\n\nimport { readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\n/**\n * Load instructions from SKILL.md file\n * Removes YAML frontmatter (content between --- markers)\n */\nfunction loadInstructions(): string {\n try {\n // In dist/, go up to package root, then to skills/\n const skillPath = join(__dirname, '..', 'skills', 'SKILL.md');\n const content = readFileSync(skillPath, 'utf-8');\n\n // Remove YAML frontmatter (between --- markers at start of file)\n const withoutFrontmatter = content.replace(/^---\\n[\\s\\S]*?\\n---\\n+/, '');\n\n return withoutFrontmatter.trim();\n } catch {\n // Fallback if file not found (shouldn't happen in production)\n return 'Productive.io MCP Server - Use the productive tool with resource and action parameters.';\n }\n}\n\nexport const INSTRUCTIONS = loadInstructions();\n","/**\n * Package version - injected from package.json at build time\n */\ndeclare const __VERSION__: string;\nexport const VERSION = __VERSION__;\n"],"mappings":";;;;;;;;;;;;AAcA,IAAM,YAAY,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC;;;;;AAMzD,SAAS,mBAA2B;AAClC,KAAI;AAQF,SALgB,aADE,KAAK,WAAW,MAAM,UAAU,WAAW,EACrB,QAAQ,CAGb,QAAQ,0BAA0B,GAAG,CAE9C,MAAM;SAC1B;AAEN,SAAO;;;AAIX,MAAa,eAAe,kBAAkB;AChC9C,MAAa,UAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiometa/productive-mcp",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.3",
|
|
4
4
|
"description": "MCP server for Productive.io API - Model Context Protocol integration for Claude Desktop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
90
|
-
"@studiometa/productive-api": "0.10.
|
|
91
|
-
"@studiometa/productive-core": "0.10.
|
|
90
|
+
"@studiometa/productive-api": "0.10.3",
|
|
91
|
+
"@studiometa/productive-core": "0.10.3",
|
|
92
92
|
"h3": "^1.15.1",
|
|
93
93
|
"zod": "4.3.6"
|
|
94
94
|
},
|
package/skills/SKILL.md
CHANGED
|
@@ -23,33 +23,22 @@ productive(resource, action, [parameters...])
|
|
|
23
23
|
|
|
24
24
|
| Resource | Actions | Description |
|
|
25
25
|
| ------------- | ------------------------------------------------------------------------ | -------------------------------------------------------- |
|
|
26
|
-
| `projects` | `list`, `get`, `resolve`, `help`
|
|
26
|
+
| `projects` | `list`, `get`, `resolve`, `context`, `help` | Project management |
|
|
27
27
|
| `time` | `list`, `get`, `create`, `update`, `resolve`, `help` | Time tracking |
|
|
28
|
-
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `help`
|
|
28
|
+
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `context`, `help` | Task management |
|
|
29
29
|
| `services` | `list`, `get`, `resolve`, `help` | Budget line items |
|
|
30
30
|
| `people` | `list`, `get`, `me`, `resolve`, `help` | Team members |
|
|
31
31
|
| `companies` | `list`, `get`, `create`, `update`, `resolve`, `help` | Client companies |
|
|
32
32
|
| `comments` | `list`, `get`, `create`, `update`, `help` | Comments on tasks/deals |
|
|
33
33
|
| `attachments` | `list`, `get`, `delete`, `help` | File attachments |
|
|
34
34
|
| `timers` | `list`, `get`, `start`, `stop`, `help` | Active timers |
|
|
35
|
-
| `deals` | `list`, `get`, `create`, `update`, `resolve`, `help`
|
|
36
|
-
| `bookings` | `list`, `get`, `create`, `update`, `help` | Resource scheduling |
|
|
37
|
-
| `reports` | `get`, `help` | Generate reports |
|
|
38
|
-
| Resource | Actions | Description |
|
|
39
|
-
| ------------- | ------------------------------------------------------------------------ | ----------------------- |
|
|
40
|
-
| `projects` | `list`, `get`, `resolve`, `help` | Project management |
|
|
41
|
-
| `time` | `list`, `get`, `create`, `update`, `resolve`, `help` | Time tracking |
|
|
42
|
-
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `help` | Task management |
|
|
43
|
-
| `services` | `list`, `get`, `resolve`, `help` | Budget line items |
|
|
44
|
-
| `people` | `list`, `get`, `me`, `resolve`, `help` | Team members |
|
|
45
|
-
| `companies` | `list`, `get`, `create`, `update`, `resolve`, `help` | Client companies |
|
|
46
|
-
| `comments` | `list`, `get`, `create`, `update`, `help` | Comments on tasks/deals |
|
|
47
|
-
| `timers` | `list`, `get`, `start`, `stop`, `help` | Active timers |
|
|
48
|
-
| `deals` | `list`, `get`, `create`, `update`, `resolve`, `help` | Sales deals & budgets |
|
|
35
|
+
| `deals` | `list`, `get`, `create`, `update`, `resolve`, `context`, `help` | Sales deals & budgets (use `filter[type]=2` for budgets) |
|
|
49
36
|
| `bookings` | `list`, `get`, `create`, `update`, `help` | Resource scheduling |
|
|
50
37
|
| `pages` | `list`, `get`, `create`, `update`, `delete`, `help` | Wiki/docs pages |
|
|
51
38
|
| `discussions` | `list`, `get`, `create`, `update`, `delete`, `resolve`, `reopen`, `help` | Discussions on pages |
|
|
39
|
+
| `activities` | `list`, `help` | Activity feed (audit log of create/update/delete events) |
|
|
52
40
|
| `reports` | `get`, `help` | Generate reports |
|
|
41
|
+
| `workflows` | `complete_task`, `log_day`, `weekly_standup`, `help` | Compound workflows chaining multiple operations |
|
|
53
42
|
|
|
54
43
|
### Getting Help
|
|
55
44
|
|
|
@@ -265,6 +254,13 @@ Response:
|
|
|
265
254
|
### Services
|
|
266
255
|
|
|
267
256
|
```json
|
|
257
|
+
// List services for a deal (budget line items) — prefer this over project_id when you have a deal
|
|
258
|
+
{
|
|
259
|
+
"resource": "services",
|
|
260
|
+
"action": "list",
|
|
261
|
+
"filter": { "deal_id": "12345" }
|
|
262
|
+
}
|
|
263
|
+
|
|
268
264
|
// List services for a project
|
|
269
265
|
{
|
|
270
266
|
"resource": "services",
|
|
@@ -385,6 +381,78 @@ Response:
|
|
|
385
381
|
{ "resource": "discussions", "action": "reopen", "id": "67890" }
|
|
386
382
|
```
|
|
387
383
|
|
|
384
|
+
### Workflows
|
|
385
|
+
|
|
386
|
+
Compound workflows that chain multiple operations into a single tool call.
|
|
387
|
+
|
|
388
|
+
```json
|
|
389
|
+
// Complete a task (marks closed, posts comment, stops timers)
|
|
390
|
+
{
|
|
391
|
+
"resource": "workflows",
|
|
392
|
+
"action": "complete_task",
|
|
393
|
+
"task_id": "12345",
|
|
394
|
+
"comment": "All done! Tests passing.",
|
|
395
|
+
"stop_timer": true
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// Complete a task without stopping timers
|
|
399
|
+
{
|
|
400
|
+
"resource": "workflows",
|
|
401
|
+
"action": "complete_task",
|
|
402
|
+
"task_id": "12345",
|
|
403
|
+
"stop_timer": false
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Log a full day across multiple services (time in minutes)
|
|
407
|
+
{
|
|
408
|
+
"resource": "workflows",
|
|
409
|
+
"action": "log_day",
|
|
410
|
+
"date": "2024-01-16",
|
|
411
|
+
"entries": [
|
|
412
|
+
{ "project_id": "100", "service_id": "111", "duration_minutes": 240, "note": "Frontend development" },
|
|
413
|
+
{ "project_id": "100", "service_id": "222", "duration_minutes": 120, "note": "Code review" },
|
|
414
|
+
{ "project_id": "200", "service_id": "333", "duration_minutes": 60, "note": "Client meeting" }
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Get weekly standup (this week)
|
|
419
|
+
{ "resource": "workflows", "action": "weekly_standup" }
|
|
420
|
+
|
|
421
|
+
// Get standup for a specific week (provide the Monday date)
|
|
422
|
+
{
|
|
423
|
+
"resource": "workflows",
|
|
424
|
+
"action": "weekly_standup",
|
|
425
|
+
"week_start": "2024-01-15"
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// Get standup for a specific person
|
|
429
|
+
{
|
|
430
|
+
"resource": "workflows",
|
|
431
|
+
"action": "weekly_standup",
|
|
432
|
+
"person_id": "12345"
|
|
433
|
+
}
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
#### complete_task returns
|
|
437
|
+
|
|
438
|
+
- `task` — Updated task info (id, title, closed status)
|
|
439
|
+
- `comment_posted` — Whether the comment was successfully posted
|
|
440
|
+
- `comment_id` — ID of the created comment (if posted)
|
|
441
|
+
- `timers_stopped` — Number of timers that were stopped
|
|
442
|
+
- `errors` — Array of sub-step errors (partial results still returned)
|
|
443
|
+
|
|
444
|
+
#### log_day returns
|
|
445
|
+
|
|
446
|
+
- `entries` — Per-entry results with `success`, `time_entry` (on success), or `error` (on failure)
|
|
447
|
+
- `succeeded` / `failed` — Counts of successful and failed entries
|
|
448
|
+
- `total_minutes_logged` — Sum of minutes for successful entries
|
|
449
|
+
|
|
450
|
+
#### weekly_standup returns
|
|
451
|
+
|
|
452
|
+
- `completed_tasks` — Tasks closed this week with project names
|
|
453
|
+
- `time_logged` — Total minutes and breakdown by project (sorted by most time first)
|
|
454
|
+
- `upcoming_deadlines` — Open tasks due in the next 7 days with `days_until_due`
|
|
455
|
+
|
|
388
456
|
## Filters Reference
|
|
389
457
|
|
|
390
458
|
### Time Entries
|
|
@@ -523,6 +591,28 @@ Force full details on list:
|
|
|
523
591
|
|
|
524
592
|
When fetching a single resource with `action: "get"`, the response includes a `_hints` field with suggestions for related resources and common actions. This helps discover how to fetch additional context.
|
|
525
593
|
|
|
594
|
+
## Proactive Suggestions
|
|
595
|
+
|
|
596
|
+
Certain responses include a `_suggestions` field with data-aware warnings and recommendations. Unlike `_hints` (which point to related resources), `_suggestions` draw attention to things that need action based on the data returned.
|
|
597
|
+
|
|
598
|
+
| Resource | Action | Suggestions generated |
|
|
599
|
+
| ----------- | -------- | ---------------------------------------------------- |
|
|
600
|
+
| `tasks` | `list` | ⚠️ overdue tasks count, ℹ️ unassigned tasks count |
|
|
601
|
+
| `tasks` | `get` | ⚠️ task is N days overdue, ℹ️ no time entries |
|
|
602
|
+
| `time` | `list` | 📊 total hours logged (or X/8h if filtered by today) |
|
|
603
|
+
| `summaries` | `my_day` | ⚠️ no time logged today, ⏱️ timer running too long |
|
|
604
|
+
|
|
605
|
+
Example:
|
|
606
|
+
|
|
607
|
+
```json
|
|
608
|
+
{
|
|
609
|
+
"data": [{ "id": "1", "title": "Fix bug", "due_date": "2024-01-01" }],
|
|
610
|
+
"_suggestions": ["⚠️ 1 task(s) are overdue", "ℹ️ 1 task(s) have no assignee"]
|
|
611
|
+
}
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
Suggestions are suppressed when `no_hints: true` is set.
|
|
615
|
+
|
|
526
616
|
Example response for a task:
|
|
527
617
|
|
|
528
618
|
```json
|
|
@@ -622,6 +712,38 @@ The response includes `_hints` showing how to fetch related resources.
|
|
|
622
712
|
❌ **Wrong:** Using `include: ["comments"]` on tasks (not supported)
|
|
623
713
|
✅ **Right:** Fetch comments separately with `resource: "comments", action: "list"`
|
|
624
714
|
|
|
715
|
+
## Rich Context (Single Call)
|
|
716
|
+
|
|
717
|
+
Use `action=context` to fetch a resource along with all its related data in a single call. This replaces the multi-step approach described above.
|
|
718
|
+
|
|
719
|
+
**Available for:** `tasks`, `projects`, `deals`
|
|
720
|
+
|
|
721
|
+
### Tasks
|
|
722
|
+
|
|
723
|
+
```json
|
|
724
|
+
{ "resource": "tasks", "action": "context", "id": "16097010" }
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
Returns: task details + comments + time entries + subtasks
|
|
728
|
+
|
|
729
|
+
### Projects
|
|
730
|
+
|
|
731
|
+
```json
|
|
732
|
+
{ "resource": "projects", "action": "context", "id": "12345" }
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
Returns: project details + open tasks + services + recent time entries
|
|
736
|
+
|
|
737
|
+
### Deals
|
|
738
|
+
|
|
739
|
+
```json
|
|
740
|
+
{ "resource": "deals", "action": "context", "id": "12345" }
|
|
741
|
+
```
|
|
742
|
+
|
|
743
|
+
Returns: deal details + services + comments + time entries
|
|
744
|
+
|
|
745
|
+
> **Note:** Related data is limited to 20 items per type. For full listings, use separate `list` calls with appropriate filters.
|
|
746
|
+
|
|
625
747
|
## Time Values
|
|
626
748
|
|
|
627
749
|
**Time is always in MINUTES:**
|
|
@@ -669,3 +791,4 @@ Key points:
|
|
|
669
791
|
4. **Use `query`** for text search - behavior varies by resource but may include related fields (e.g., tasks query may match project names)
|
|
670
792
|
5. **Check `people.me`** first to get the current user's ID for filters
|
|
671
793
|
6. **Follow `_hints`** - When getting a resource, check the `_hints` field for suggestions on fetching related context
|
|
794
|
+
7. **Act on `_suggestions`** - When present, `_suggestions` highlight data issues (overdue tasks, no time logged, etc.) that may need attention or should be surfaced to the user
|