@myspec/mcp-server 0.1.2-next.35 → 0.1.2-next.36
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/index.js +32 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2036,17 +2036,28 @@ var inputSchema3 = {
|
|
|
2036
2036
|
};
|
|
2037
2037
|
var deleteProjectTool = {
|
|
2038
2038
|
name: "delete_project",
|
|
2039
|
-
description: "Soft-delete a project.
|
|
2039
|
+
description: "Soft-delete a project. Only a project that is already archived can be deleted. If the project is still active, this tool refuses and you must NOT archive it on the user's behalf to make the deletion go through \u2014 instead, reconfirm with the user whether deleting the project is truly intended.",
|
|
2040
2040
|
inputSchema: inputSchema3,
|
|
2041
2041
|
handler: async (args, ctx) => {
|
|
2042
|
+
let status;
|
|
2042
2043
|
try {
|
|
2043
|
-
await ctx.client.
|
|
2044
|
+
const project = await ctx.client.getProject(args.project_id);
|
|
2045
|
+
status = project.status;
|
|
2044
2046
|
} catch (err) {
|
|
2045
2047
|
const message = err instanceof Error ? err.message : String(err);
|
|
2048
|
+
return errorResult(`Failed to load project ${args.project_id}: ${message}`);
|
|
2049
|
+
}
|
|
2050
|
+
if (status !== "archived") {
|
|
2046
2051
|
return errorResult(
|
|
2047
|
-
`
|
|
2052
|
+
`Project ${args.project_id} (status '${status}') can't be deleted. Reconfirm with the user whether deleting this project is intended or a mistake before taking any further action.`
|
|
2048
2053
|
);
|
|
2049
2054
|
}
|
|
2055
|
+
try {
|
|
2056
|
+
await ctx.client.deleteProject(args.project_id);
|
|
2057
|
+
} catch (err) {
|
|
2058
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
2059
|
+
return errorResult(`Failed to delete project ${args.project_id}: ${message}`);
|
|
2060
|
+
}
|
|
2050
2061
|
return jsonResult({ deleted: true, project_id: args.project_id });
|
|
2051
2062
|
}
|
|
2052
2063
|
};
|
|
@@ -2403,20 +2414,32 @@ var unarchiveProjectTool = {
|
|
|
2403
2414
|
import { z as z10 } from "zod";
|
|
2404
2415
|
var inputSchema10 = {
|
|
2405
2416
|
project_id: z10.string().min(1).describe("UUID of the project to update."),
|
|
2406
|
-
name: z10.string().optional().describe("New project name."),
|
|
2407
|
-
description: z10.string().optional().describe("New project description.")
|
|
2417
|
+
name: z10.string().min(1).optional().describe("New project name."),
|
|
2418
|
+
description: z10.string().optional().describe("New project description."),
|
|
2419
|
+
project_type: z10.enum(["greenfield", "brownfield", "auto"]).optional().describe(
|
|
2420
|
+
"Codebase type. 'greenfield' or 'brownfield' sets it explicitly; 'auto' clears it so the workflow decides. Omit to leave unchanged."
|
|
2421
|
+
)
|
|
2408
2422
|
};
|
|
2409
2423
|
var updateProjectTool = {
|
|
2410
2424
|
name: "update_project",
|
|
2411
|
-
description: "Update a project's metadata (name, description). Returns the updated metadata.",
|
|
2425
|
+
description: "Update a project's metadata (name, description, project_type). Returns the updated metadata.",
|
|
2412
2426
|
inputSchema: inputSchema10,
|
|
2413
2427
|
handler: async (args, ctx) => {
|
|
2414
|
-
if (args.name === void 0 && args.description === void 0) {
|
|
2415
|
-
return errorResult(
|
|
2428
|
+
if (args.name === void 0 && args.description === void 0 && args.project_type === void 0) {
|
|
2429
|
+
return errorResult(
|
|
2430
|
+
"Provide at least one field to update (name, description, or project_type)."
|
|
2431
|
+
);
|
|
2432
|
+
}
|
|
2433
|
+
let projectType;
|
|
2434
|
+
if (args.project_type === "auto") {
|
|
2435
|
+
projectType = "";
|
|
2436
|
+
} else {
|
|
2437
|
+
projectType = args.project_type;
|
|
2416
2438
|
}
|
|
2417
2439
|
const project = await ctx.client.updateProject(args.project_id, {
|
|
2418
2440
|
name: args.name,
|
|
2419
|
-
description: args.description
|
|
2441
|
+
description: args.description,
|
|
2442
|
+
projectType
|
|
2420
2443
|
});
|
|
2421
2444
|
return jsonResult({ project: projectSummary(project) });
|
|
2422
2445
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myspec/mcp-server",
|
|
3
|
-
"version": "0.1.2-next.
|
|
3
|
+
"version": "0.1.2-next.36",
|
|
4
4
|
"description": "MySpec MCP server — exposes MySpec platform projects, files and attachments to MCP-aware clients via OAuth-authenticated access tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|