@taazkareem/clickup-mcp-server 0.4.64 → 0.4.66
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/build/tools/workspace.js +21 -60
- package/package.json +16 -4
package/build/tools/workspace.js
CHANGED
|
@@ -50,71 +50,32 @@ export async function handleGetWorkspaceHierarchy() {
|
|
|
50
50
|
*/
|
|
51
51
|
function formatHierarchyResponse(hierarchy) {
|
|
52
52
|
try {
|
|
53
|
-
// Helper function to format
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (node.children && node.children.length > 0) {
|
|
71
|
-
const childrenByType = formatNodesByType(node.children);
|
|
72
|
-
spaceResult.lists = childrenByType.lists;
|
|
73
|
-
spaceResult.folders = childrenByType.folders;
|
|
74
|
-
}
|
|
75
|
-
result.spaces.push(spaceResult);
|
|
76
|
-
}
|
|
77
|
-
else if (node.type === 'folder') {
|
|
78
|
-
const folderResult = {
|
|
79
|
-
id: node.id,
|
|
80
|
-
name: node.name,
|
|
81
|
-
type: node.type,
|
|
82
|
-
lists: []
|
|
83
|
-
};
|
|
84
|
-
// Process children of folder (only lists)
|
|
85
|
-
if (node.children && node.children.length > 0) {
|
|
86
|
-
folderResult.lists = node.children
|
|
87
|
-
.filter(child => child.type === 'list')
|
|
88
|
-
.map(list => ({
|
|
89
|
-
id: list.id,
|
|
90
|
-
name: list.name,
|
|
91
|
-
type: list.type
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
result.folders.push(folderResult);
|
|
95
|
-
}
|
|
96
|
-
else if (node.type === 'list') {
|
|
97
|
-
result.lists.push({
|
|
98
|
-
id: node.id,
|
|
99
|
-
name: node.name,
|
|
100
|
-
type: node.type
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return result;
|
|
105
|
-
};
|
|
106
|
-
// Convert the workspace hierarchy to a simplified format
|
|
107
|
-
const rootChildren = formatNodesByType(hierarchy.root.children);
|
|
108
|
-
const formattedHierarchy = {
|
|
109
|
-
workspaceId: hierarchy.root.id,
|
|
110
|
-
workspaceName: hierarchy.root.name,
|
|
111
|
-
spaces: rootChildren.spaces
|
|
53
|
+
// Helper function to format a node and its children as a tree
|
|
54
|
+
const formatNodeAsTree = (node, level = 0, isLast = true, parentPrefix = '') => {
|
|
55
|
+
const lines = [];
|
|
56
|
+
// Calculate the current line's prefix
|
|
57
|
+
const currentPrefix = level === 0 ? '' : parentPrefix + (isLast ? '└── ' : '├── ');
|
|
58
|
+
// Format current node with descriptive ID type
|
|
59
|
+
const idType = 'type' in node ? `${node.type.charAt(0).toUpperCase() + node.type.slice(1)} ID` : 'Workspace ID';
|
|
60
|
+
lines.push(`${currentPrefix}${node.name} (${idType}: ${node.id})`);
|
|
61
|
+
// Calculate the prefix for children
|
|
62
|
+
const childPrefix = level === 0 ? '' : parentPrefix + (isLast ? ' ' : '│ ');
|
|
63
|
+
// Process children
|
|
64
|
+
const children = node.children || [];
|
|
65
|
+
children.forEach((child, index) => {
|
|
66
|
+
const childLines = formatNodeAsTree(child, level + 1, index === children.length - 1, childPrefix);
|
|
67
|
+
lines.push(...childLines);
|
|
68
|
+
});
|
|
69
|
+
return lines;
|
|
112
70
|
};
|
|
71
|
+
// Generate tree representation
|
|
72
|
+
const treeLines = formatNodeAsTree(hierarchy.root);
|
|
73
|
+
const treeOutput = treeLines.join('\n');
|
|
113
74
|
return {
|
|
114
75
|
content: [
|
|
115
76
|
{
|
|
116
77
|
type: "text",
|
|
117
|
-
text:
|
|
78
|
+
text: treeOutput
|
|
118
79
|
}
|
|
119
80
|
]
|
|
120
81
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taazkareem/clickup-mcp-server",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.66",
|
|
4
4
|
"description": "ClickUp MCP Server - Integrate ClickUp tasks with AI through Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -28,7 +28,21 @@
|
|
|
28
28
|
"project-management",
|
|
29
29
|
"model-context-protocol",
|
|
30
30
|
"clickup-server",
|
|
31
|
-
"clickup-mcp-server"
|
|
31
|
+
"clickup-mcp-server",
|
|
32
|
+
"task-management",
|
|
33
|
+
"productivity",
|
|
34
|
+
"automation",
|
|
35
|
+
"workflow",
|
|
36
|
+
"team-collaboration",
|
|
37
|
+
"artificial-intelligence",
|
|
38
|
+
"project-tracking",
|
|
39
|
+
"task-tracking",
|
|
40
|
+
"project-planning",
|
|
41
|
+
"clickup-integration",
|
|
42
|
+
"clickup-api",
|
|
43
|
+
"clickup-automation",
|
|
44
|
+
"task-organization",
|
|
45
|
+
"project-organization"
|
|
32
46
|
],
|
|
33
47
|
"author": "Talib Kareem",
|
|
34
48
|
"license": "MIT",
|
|
@@ -42,8 +56,6 @@
|
|
|
42
56
|
"homepage": "https://github.com/taazkareem/clickup-mcp-server#readme",
|
|
43
57
|
"dependencies": {
|
|
44
58
|
"@modelcontextprotocol/sdk": "0.6.0",
|
|
45
|
-
"@modelcontextprotocol/server-github": "^2025.1.23",
|
|
46
|
-
"@taazkareem/clickup-mcp-server": "^0.4.60",
|
|
47
59
|
"axios": "^1.6.7",
|
|
48
60
|
"dotenv": "^16.4.1"
|
|
49
61
|
},
|