@1medium/cli 1.6.0 → 1.7.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/package.json +1 -1
- package/src/api.js +8 -0
- package/src/mcp-server.js +34 -0
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -145,6 +145,13 @@ async function listOrgs() {
|
|
|
145
145
|
return request("GET", "/orgs");
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Update an organization
|
|
150
|
+
*/
|
|
151
|
+
async function updateOrg(id, payload) {
|
|
152
|
+
return request("PATCH", `/orgs/${id}`, payload);
|
|
153
|
+
}
|
|
154
|
+
|
|
148
155
|
/**
|
|
149
156
|
* List spaces (top-level priority groups)
|
|
150
157
|
*/
|
|
@@ -210,6 +217,7 @@ module.exports = {
|
|
|
210
217
|
addComment,
|
|
211
218
|
completeTask,
|
|
212
219
|
listOrgs,
|
|
220
|
+
updateOrg,
|
|
213
221
|
listSpaces,
|
|
214
222
|
createSpace,
|
|
215
223
|
updateSpace,
|
package/src/mcp-server.js
CHANGED
|
@@ -60,6 +60,24 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
60
60
|
properties: {},
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
name: "org_update",
|
|
65
|
+
description: "Rename an organization",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
id: {
|
|
70
|
+
type: "string",
|
|
71
|
+
description: "Organization ID to update",
|
|
72
|
+
},
|
|
73
|
+
name: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "New name for the organization",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
required: ["id", "name"],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
63
81
|
{
|
|
64
82
|
name: "task_create",
|
|
65
83
|
description: "Create a new task in 1Medium. Use this to track work items, todos, or any actionable items.",
|
|
@@ -486,6 +504,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
486
504
|
};
|
|
487
505
|
}
|
|
488
506
|
|
|
507
|
+
case "org_update": {
|
|
508
|
+
result = await api.updateOrg(args.id, { name: args.name });
|
|
509
|
+
// Update session state if this is the active org
|
|
510
|
+
if (sessionState.get("orgId") === args.id) {
|
|
511
|
+
sessionState.set("orgName", result.org.name);
|
|
512
|
+
}
|
|
513
|
+
return {
|
|
514
|
+
content: [
|
|
515
|
+
{
|
|
516
|
+
type: "text",
|
|
517
|
+
text: `Organization renamed:\n ID: ${result.org.id}\n Name: ${result.org.name}`,
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
|
|
489
523
|
case "task_create": {
|
|
490
524
|
// Use provided project_id or fall back to configured default
|
|
491
525
|
const projectId = args.project_id || sessionState.get("projectId") || null;
|