@studiometa/productive-mcp 0.10.0 → 0.10.2
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/handlers/batch.d.ts +58 -0
- package/dist/handlers/batch.d.ts.map +1 -0
- package/dist/handlers/deals.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/schema.d.ts +33 -0
- package/dist/handlers/schema.d.ts.map +1 -0
- package/dist/handlers/search.d.ts +28 -0
- package/dist/handlers/search.d.ts.map +1 -0
- 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-BE3CYyVX.js → handlers-B8GRTaDu.js} +774 -19
- package/dist/handlers-B8GRTaDu.js.map +1 -0
- package/dist/handlers.js +1 -1
- package/dist/http.js +2 -2
- package/dist/index.js +2 -2
- package/dist/schema.d.ts +27 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/server.js +2 -2
- package/dist/stdio.js +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +64 -15
- package/dist/tools.js.map +1 -1
- package/dist/{version-BKUpCCHx.js → version-Bl0krPVf.js} +2 -2
- package/dist/{version-BKUpCCHx.js.map → version-Bl0krPVf.js.map} +1 -1
- package/package.json +3 -3
- package/skills/SKILL.md +39 -16
- package/dist/handlers-BE3CYyVX.js.map +0 -1
package/dist/tools.js
CHANGED
|
@@ -4,7 +4,19 @@ import { ACTIONS, REPORT_TYPES, RESOURCES } from "@studiometa/productive-core";
|
|
|
4
4
|
* Adding a resource or action to constants.ts automatically updates this description.
|
|
5
5
|
*/
|
|
6
6
|
function generateDescription() {
|
|
7
|
-
return
|
|
7
|
+
return [
|
|
8
|
+
"Productive.io API.",
|
|
9
|
+
`Resources: ${RESOURCES.join(", ")}.`,
|
|
10
|
+
`Actions: ${ACTIONS.join(", ")} (varies by resource).`,
|
|
11
|
+
"Discovery: action=help with any resource for filters, fields, examples. action=schema for compact machine-readable spec.",
|
|
12
|
+
"Filters: filter:{key:value}. Common: project_id, person_id, after/before (YYYY-MM-DD).",
|
|
13
|
+
"Includes: include:[...] for related data (e.g. [\"project\",\"assignee\"]).",
|
|
14
|
+
"Output: compact=false for full detail (default for get; list defaults true).",
|
|
15
|
+
"Search: query for text search on list actions. Cross-resource: resource=search action=run with query searches projects, companies, people, tasks simultaneously.",
|
|
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.",
|
|
18
|
+
"Rich context: action=context on tasks/projects/deals for full context in one call."
|
|
19
|
+
].join("\n");
|
|
8
20
|
}
|
|
9
21
|
/**
|
|
10
22
|
* Single consolidated tool for Productive.io MCP server
|
|
@@ -41,7 +53,7 @@ const TOOLS = [{
|
|
|
41
53
|
action: {
|
|
42
54
|
type: "string",
|
|
43
55
|
enum: [...ACTIONS],
|
|
44
|
-
description: "
|
|
56
|
+
description: "Use \"help\" for resource documentation"
|
|
45
57
|
},
|
|
46
58
|
id: { type: "string" },
|
|
47
59
|
filter: { type: "object" },
|
|
@@ -54,11 +66,16 @@ const TOOLS = [{
|
|
|
54
66
|
include: {
|
|
55
67
|
type: "array",
|
|
56
68
|
items: { type: "string" },
|
|
57
|
-
description: "Related
|
|
69
|
+
description: "Related data to include (e.g. [\"project\",\"assignee\"])"
|
|
58
70
|
},
|
|
59
71
|
query: {
|
|
60
72
|
type: "string",
|
|
61
|
-
description: "Text search
|
|
73
|
+
description: "Text search for list actions"
|
|
74
|
+
},
|
|
75
|
+
resources: {
|
|
76
|
+
type: "array",
|
|
77
|
+
items: { type: "string" },
|
|
78
|
+
description: "Resource types to search (for resource=search). Defaults to [projects, companies, people, tasks]. Valid values: projects, companies, people, tasks, deals."
|
|
62
79
|
},
|
|
63
80
|
person_id: { type: "string" },
|
|
64
81
|
service_id: { type: "string" },
|
|
@@ -75,30 +92,62 @@ const TOOLS = [{
|
|
|
75
92
|
name: { type: "string" },
|
|
76
93
|
page_id: {
|
|
77
94
|
type: "string",
|
|
78
|
-
description: "Page ID
|
|
95
|
+
description: "Page ID (list pages to find)"
|
|
79
96
|
},
|
|
80
97
|
parent_page_id: {
|
|
81
98
|
type: "string",
|
|
82
|
-
description: "Parent page ID for
|
|
99
|
+
description: "Parent page ID for sub-pages"
|
|
100
|
+
},
|
|
101
|
+
body: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Comment/page body content"
|
|
83
104
|
},
|
|
84
|
-
body: { type: "string" },
|
|
85
105
|
deal_id: { type: "string" },
|
|
86
106
|
comment_id: {
|
|
87
107
|
type: "string",
|
|
88
|
-
description: "Comment ID for
|
|
108
|
+
description: "Comment ID (for attachments)"
|
|
89
109
|
},
|
|
90
110
|
time_entry_id: { type: "string" },
|
|
91
|
-
started_on: {
|
|
92
|
-
|
|
111
|
+
started_on: {
|
|
112
|
+
type: "string",
|
|
113
|
+
description: "Booking date (YYYY-MM-DD)"
|
|
114
|
+
},
|
|
115
|
+
ended_on: {
|
|
116
|
+
type: "string",
|
|
117
|
+
description: "Booking end date (YYYY-MM-DD)"
|
|
118
|
+
},
|
|
93
119
|
event_id: { type: "string" },
|
|
94
120
|
report_type: {
|
|
95
121
|
type: "string",
|
|
96
|
-
enum: [...REPORT_TYPES]
|
|
122
|
+
enum: [...REPORT_TYPES],
|
|
123
|
+
description: "Required for resource=reports action=get"
|
|
124
|
+
},
|
|
125
|
+
group: {
|
|
126
|
+
type: "string",
|
|
127
|
+
description: "Report grouping: person, project, service"
|
|
128
|
+
},
|
|
129
|
+
from: {
|
|
130
|
+
type: "string",
|
|
131
|
+
description: "Report start (YYYY-MM-DD); filter.after for time"
|
|
132
|
+
},
|
|
133
|
+
to: {
|
|
134
|
+
type: "string",
|
|
135
|
+
description: "Report end (YYYY-MM-DD); filter.before for time"
|
|
97
136
|
},
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
137
|
+
status: { type: "string" },
|
|
138
|
+
operations: {
|
|
139
|
+
type: "array",
|
|
140
|
+
items: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
resource: { type: "string" },
|
|
144
|
+
action: { type: "string" }
|
|
145
|
+
},
|
|
146
|
+
required: ["resource", "action"]
|
|
147
|
+
},
|
|
148
|
+
maxItems: 10,
|
|
149
|
+
description: "Array of operations for batch execution (max 10). Each operation needs resource, action, and any additional params."
|
|
150
|
+
}
|
|
102
151
|
},
|
|
103
152
|
required: ["resource", "action"]
|
|
104
153
|
}
|
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
|
|
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":"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"}
|
|
@@ -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.2";
|
|
27
27
|
export { INSTRUCTIONS as n, VERSION as t };
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=version-
|
|
29
|
+
//# sourceMappingURL=version-Bl0krPVf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-Bl0krPVf.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.2",
|
|
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.2",
|
|
91
|
+
"@studiometa/productive-core": "0.10.2",
|
|
92
92
|
"h3": "^1.15.1",
|
|
93
93
|
"zod": "4.3.6"
|
|
94
94
|
},
|
package/skills/SKILL.md
CHANGED
|
@@ -7,6 +7,10 @@ description: MCP server for Productive.io - use with Claude Desktop or MCP-compa
|
|
|
7
7
|
|
|
8
8
|
MCP (Model Context Protocol) server for Productive.io. Provides a single unified tool for all operations.
|
|
9
9
|
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
Before your first interaction with any resource, call `action=help` with that resource to discover valid filters, required fields, includes, and examples.
|
|
13
|
+
|
|
10
14
|
## The `productive` Tool
|
|
11
15
|
|
|
12
16
|
Single unified tool with this signature:
|
|
@@ -19,29 +23,16 @@ productive(resource, action, [parameters...])
|
|
|
19
23
|
|
|
20
24
|
| Resource | Actions | Description |
|
|
21
25
|
| ------------- | ------------------------------------------------------------------------ | -------------------------------------------------------- |
|
|
22
|
-
| `projects` | `list`, `get`, `resolve`, `help`
|
|
26
|
+
| `projects` | `list`, `get`, `resolve`, `context`, `help` | Project management |
|
|
23
27
|
| `time` | `list`, `get`, `create`, `update`, `resolve`, `help` | Time tracking |
|
|
24
|
-
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `help`
|
|
28
|
+
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `context`, `help` | Task management |
|
|
25
29
|
| `services` | `list`, `get`, `resolve`, `help` | Budget line items |
|
|
26
30
|
| `people` | `list`, `get`, `me`, `resolve`, `help` | Team members |
|
|
27
31
|
| `companies` | `list`, `get`, `create`, `update`, `resolve`, `help` | Client companies |
|
|
28
32
|
| `comments` | `list`, `get`, `create`, `update`, `help` | Comments on tasks/deals |
|
|
29
33
|
| `attachments` | `list`, `get`, `delete`, `help` | File attachments |
|
|
30
34
|
| `timers` | `list`, `get`, `start`, `stop`, `help` | Active timers |
|
|
31
|
-
| `deals` | `list`, `get`, `create`, `update`, `resolve`, `help`
|
|
32
|
-
| `bookings` | `list`, `get`, `create`, `update`, `help` | Resource scheduling |
|
|
33
|
-
| `reports` | `get`, `help` | Generate reports |
|
|
34
|
-
| Resource | Actions | Description |
|
|
35
|
-
| ------------- | ------------------------------------------------------------------------ | ----------------------- |
|
|
36
|
-
| `projects` | `list`, `get`, `resolve`, `help` | Project management |
|
|
37
|
-
| `time` | `list`, `get`, `create`, `update`, `resolve`, `help` | Time tracking |
|
|
38
|
-
| `tasks` | `list`, `get`, `create`, `update`, `resolve`, `help` | Task management |
|
|
39
|
-
| `services` | `list`, `get`, `resolve`, `help` | Budget line items |
|
|
40
|
-
| `people` | `list`, `get`, `me`, `resolve`, `help` | Team members |
|
|
41
|
-
| `companies` | `list`, `get`, `create`, `update`, `resolve`, `help` | Client companies |
|
|
42
|
-
| `comments` | `list`, `get`, `create`, `update`, `help` | Comments on tasks/deals |
|
|
43
|
-
| `timers` | `list`, `get`, `start`, `stop`, `help` | Active timers |
|
|
44
|
-
| `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) |
|
|
45
36
|
| `bookings` | `list`, `get`, `create`, `update`, `help` | Resource scheduling |
|
|
46
37
|
| `pages` | `list`, `get`, `create`, `update`, `delete`, `help` | Wiki/docs pages |
|
|
47
38
|
| `discussions` | `list`, `get`, `create`, `update`, `delete`, `resolve`, `reopen`, `help` | Discussions on pages |
|
|
@@ -618,6 +609,38 @@ The response includes `_hints` showing how to fetch related resources.
|
|
|
618
609
|
❌ **Wrong:** Using `include: ["comments"]` on tasks (not supported)
|
|
619
610
|
✅ **Right:** Fetch comments separately with `resource: "comments", action: "list"`
|
|
620
611
|
|
|
612
|
+
## Rich Context (Single Call)
|
|
613
|
+
|
|
614
|
+
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.
|
|
615
|
+
|
|
616
|
+
**Available for:** `tasks`, `projects`, `deals`
|
|
617
|
+
|
|
618
|
+
### Tasks
|
|
619
|
+
|
|
620
|
+
```json
|
|
621
|
+
{ "resource": "tasks", "action": "context", "id": "16097010" }
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
Returns: task details + comments + time entries + subtasks
|
|
625
|
+
|
|
626
|
+
### Projects
|
|
627
|
+
|
|
628
|
+
```json
|
|
629
|
+
{ "resource": "projects", "action": "context", "id": "12345" }
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
Returns: project details + open tasks + services + recent time entries
|
|
633
|
+
|
|
634
|
+
### Deals
|
|
635
|
+
|
|
636
|
+
```json
|
|
637
|
+
{ "resource": "deals", "action": "context", "id": "12345" }
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
Returns: deal details + services + comments + time entries
|
|
641
|
+
|
|
642
|
+
> **Note:** Related data is limited to 20 items per type. For full listings, use separate `list` calls with appropriate filters.
|
|
643
|
+
|
|
621
644
|
## Time Values
|
|
622
645
|
|
|
623
646
|
**Time is always in MINUTES:**
|