@monadsag/productive-mcp 1.2.61 → 1.2.68

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.
@@ -0,0 +1,24 @@
1
+ import { ListPromptsRequestSchema, GetPromptRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
2
+ import { generateTimesheetPrompt, timesheetPromptDefinition, generateQuickTimesheetPrompt, quickTimesheetPromptDefinition, } from './timesheet.js';
3
+ /**
4
+ * Register the prompt handlers on a server. Shared by both entry points (stdio
5
+ * and Worker), like `registerToolsOnServer`; the server must declare the
6
+ * `prompts` capability. The prompts are static guidance and need no API token,
7
+ * so the Worker registers them on the no-token path as well.
8
+ */
9
+ export function registerPromptsOnServer(server) {
10
+ server.setRequestHandler(ListPromptsRequestSchema, async () => ({
11
+ prompts: [timesheetPromptDefinition, quickTimesheetPromptDefinition],
12
+ }));
13
+ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
14
+ const { name, arguments: args } = request.params;
15
+ switch (name) {
16
+ case 'timesheet_entry':
17
+ return await generateTimesheetPrompt(args);
18
+ case 'timesheet_step':
19
+ return await generateQuickTimesheetPrompt(args);
20
+ default:
21
+ throw new Error(`Unknown prompt: ${name}`);
22
+ }
23
+ });
24
+ }
package/build/server.js CHANGED
@@ -1,14 +1,13 @@
1
1
  import { createRequire } from 'node:module';
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
- import { ListPromptsRequestSchema, GetPromptRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
5
4
  import { getConfig } from './config/index.js';
6
5
  import { ProductiveAPIClient } from './api/client.js';
7
6
  import { withSelfPersonId } from './auth/self-resolver.js';
8
7
  import { registerToolsOnServer } from './tools/registry.js';
9
8
  import { getEnabledToolNames } from './tools/toolsets.js';
10
9
  import { LOGO_DATA_URI } from './auth/logo.js';
11
- import { generateTimesheetPrompt, timesheetPromptDefinition, generateQuickTimesheetPrompt, quickTimesheetPromptDefinition, } from './prompts/timesheet.js';
10
+ import { registerPromptsOnServer } from './prompts/registry.js';
12
11
  // The npm release sets the patch per CI run, so the version lives only in
13
12
  // package.json. Resolves from both src/ (tests) and build/ (the package).
14
13
  const { version } = createRequire(import.meta.url)('../package.json');
@@ -33,21 +32,8 @@ export async function createServer() {
33
32
  const enabledToolNames = getEnabledToolNames(config.PRODUCTIVE_TOOLSETS);
34
33
  // Register all tools via shared registry
35
34
  registerToolsOnServer(server, apiClient, config, enabledToolNames);
36
- // Register prompt handlers
37
- server.setRequestHandler(ListPromptsRequestSchema, async () => ({
38
- prompts: [timesheetPromptDefinition, quickTimesheetPromptDefinition],
39
- }));
40
- server.setRequestHandler(GetPromptRequestSchema, async (request) => {
41
- const { name, arguments: args } = request.params;
42
- switch (name) {
43
- case 'timesheet_entry':
44
- return await generateTimesheetPrompt(args);
45
- case 'timesheet_step':
46
- return await generateQuickTimesheetPrompt(args);
47
- default:
48
- throw new Error(`Unknown prompt: ${name}`);
49
- }
50
- });
35
+ // Register prompt handlers via shared registry
36
+ registerPromptsOnServer(server);
51
37
  // Connect to stdio transport
52
38
  const transport = new StdioServerTransport();
53
39
  await server.connect(transport);
@@ -336,7 +336,7 @@ export const createPageDefinition = {
336
336
  },
337
337
  markdown: {
338
338
  type: 'string',
339
- description: 'Body content of the page as Markdown (optional). Headings, lists, tables, checklists, code blocks and links are supported.',
339
+ description: 'Body content of the page as Markdown (optional). Headings, lists, tables, checklists, code blocks, links and images (![alt](url)) are supported.',
340
340
  },
341
341
  parent_page_id: {
342
342
  type: 'number',
@@ -373,7 +373,7 @@ export const updatePageDefinition = {
373
373
  },
374
374
  markdown: {
375
375
  type: 'string',
376
- description: 'New body content as Markdown. Replaces the current body unless append is true. Omit to leave the body unchanged.',
376
+ description: 'New body content as Markdown. Replaces the current body unless append is true. Omit to leave the body unchanged. Images are written as ![alt](url); images already on the page are lost on replace unless written back as ![alt](src) with the src of their image node from get_page.',
377
377
  },
378
378
  append: {
379
379
  type: 'boolean',
@@ -30,8 +30,9 @@ export async function listProjectsTool(client, args) {
30
30
  .map((project) => {
31
31
  const companyId = project.relationships?.company?.data?.id;
32
32
  const companyName = resolveName(nameMap, 'companies', companyId);
33
+ const archived = !!project.attributes.archived_at || project.attributes.status === 2;
33
34
  return `• ${project.attributes.name} (ID: ${project.id})
34
- Status: ${project.attributes.status}
35
+ Status: ${archived ? 'archived' : 'active'}
35
36
  ${companyName ? `Company: ${companyName}` : companyId ? `Company ID: ${companyId}` : ''}`;
36
37
  })
37
38
  .join('\n\n');
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@monadsag/productive-mcp",
3
- "version": "1.2.61",
3
+ "version": "1.2.68",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@monadsag/productive-mcp",
9
- "version": "1.2.61",
9
+ "version": "1.2.68",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "^1.13.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monadsag/productive-mcp",
3
- "version": "1.2.61",
3
+ "version": "1.2.68",
4
4
  "type": "module",
5
5
  "main": "./build/index.js",
6
6
  "bin": {