@scayver/specshot-mcp-server 0.11.0 → 0.13.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/README.md +104 -4
- package/dist/build-standard.js +5034 -17
- package/dist/index.js +36 -13
- package/dist/skills.js +476 -0
- package/dist/tool-descriptions.js +87 -0
- package/dist/tools/agent-loop.js +81 -0
- package/dist/tools/brand.js +2 -1
- package/dist/tools/canvas.js +5 -4
- package/dist/tools/concepts.js +58 -5
- package/dist/tools/images.js +67 -0
- package/dist/tools/inspiration.js +2 -1
- package/dist/tools/messages.js +12 -6
- package/dist/tools/prototype.js +27 -0
- package/dist/tools/render.js +53 -0
- package/dist/tools/review.js +27 -0
- package/dist/tools/site.js +78 -0
- package/dist/tools/skills.js +20 -0
- package/dist/tools/state.js +33 -0
- package/dist/tools/wireframe.js +41 -21
- package/dist/tools/wordpress.js +24 -0
- package/dist/tools/workspace.js +26 -22
- package/package.json +2 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
function ok(data) {
|
|
4
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
5
|
+
}
|
|
6
|
+
function fail(message) {
|
|
7
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Owned by slice 2, review anywhere (docs/CANVAS-DOOP-PLAN.md, section 4.3). index.ts calls this
|
|
11
|
+
* once, so the slice registers its stdio tools here without editing index.ts. The hosted twin is
|
|
12
|
+
* apps/web/src/lib/mcp/tools-review.ts, and the parity test holds the two to the same tool names.
|
|
13
|
+
* Each tool calls a REST route under /api/mcp through `client` and takes its description from
|
|
14
|
+
* toolDescription(name), so the two transports say the same thing.
|
|
15
|
+
*
|
|
16
|
+
* reply_to_comment: POST /api/mcp/comments/[commentId]/replies. Requires a read/write token.
|
|
17
|
+
*/
|
|
18
|
+
export function registerReviewTools(server, client) {
|
|
19
|
+
server.tool("reply_to_comment", toolDescription("reply_to_comment"), { commentId: z.string().uuid(), comment: z.string().min(1).max(8000) }, async ({ commentId, comment }) => {
|
|
20
|
+
try {
|
|
21
|
+
return ok(await client.post(`/api/mcp/comments/${encodeURIComponent(commentId)}/replies`, { comment }));
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
return fail(e instanceof Error ? e.message : "Failed to reply to the comment.");
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
function ok(data) {
|
|
4
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
5
|
+
}
|
|
6
|
+
function fail(message) {
|
|
7
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
|
+
}
|
|
9
|
+
const path = (projectId, rest) => `/api/mcp/projects/${encodeURIComponent(projectId)}/site/${rest}`;
|
|
10
|
+
/**
|
|
11
|
+
* Whole-site generation for agents (docs/WHOLE-SITE-GENERATION-PLAN.md, "Agents over MCP"), over the
|
|
12
|
+
* REST routes under /api/mcp/projects/[id]/site. The hosted twin is
|
|
13
|
+
* apps/web/src/lib/mcp/tools-site.ts; the parity test holds the two to the same names, and each
|
|
14
|
+
* description comes from the generated tool-descriptions.ts, so the two transports cannot drift.
|
|
15
|
+
* The server checks every argument. publish_page_version's site mode is registered with
|
|
16
|
+
* publish_page_version in wireframe.ts.
|
|
17
|
+
*/
|
|
18
|
+
export function registerSiteTools(server, client) {
|
|
19
|
+
server.tool("get_site_plan", toolDescription("get_site_plan"), { projectId: z.string() }, async ({ projectId }) => {
|
|
20
|
+
try {
|
|
21
|
+
return ok(await client.get(path(projectId, "plan")));
|
|
22
|
+
}
|
|
23
|
+
catch (e) {
|
|
24
|
+
return fail(e instanceof Error ? e.message : "Failed to read the site plan.");
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
server.tool("get_site_kit", toolDescription("get_site_kit"), { projectId: z.string(), detail: z.enum(["summary", "full"]).optional() }, async ({ projectId, detail }) => {
|
|
28
|
+
try {
|
|
29
|
+
return ok(await client.get(path(projectId, "kit"), { detail }));
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
return fail(e instanceof Error ? e.message : "Failed to read the site system.");
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
server.tool("save_site_kit", toolDescription("save_site_kit"), {
|
|
36
|
+
projectId: z.string(),
|
|
37
|
+
html: z.string(),
|
|
38
|
+
css: z.string().optional(),
|
|
39
|
+
direction: z.record(z.unknown()).optional(),
|
|
40
|
+
itemId: z.string().optional(),
|
|
41
|
+
allowShrink: z.boolean().optional(),
|
|
42
|
+
}, async ({ projectId, ...rest }) => {
|
|
43
|
+
try {
|
|
44
|
+
return ok(await client.post(path(projectId, "kit"), rest));
|
|
45
|
+
}
|
|
46
|
+
catch (e) {
|
|
47
|
+
return fail(e instanceof Error ? e.message : "Failed to save the site system.");
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
server.tool("set_page_families", toolDescription("set_page_families"), {
|
|
51
|
+
projectId: z.string(),
|
|
52
|
+
groupByCode: z.boolean().optional(),
|
|
53
|
+
families: z.array(z.record(z.unknown())).optional(),
|
|
54
|
+
order: z.array(z.string()).optional(),
|
|
55
|
+
}, async ({ projectId, ...rest }) => {
|
|
56
|
+
try {
|
|
57
|
+
return ok(await client.post(path(projectId, "families"), rest));
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
return fail(e instanceof Error ? e.message : "Failed to change the page families.");
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
server.tool("next_site_page", toolDescription("next_site_page"), {
|
|
64
|
+
projectId: z.string(),
|
|
65
|
+
start: z.boolean().optional(),
|
|
66
|
+
pageIds: z.array(z.string()).optional(),
|
|
67
|
+
concurrency: z.number().optional(),
|
|
68
|
+
another: z.boolean().optional(),
|
|
69
|
+
known: z.array(z.string()).optional(),
|
|
70
|
+
}, async ({ projectId, ...rest }) => {
|
|
71
|
+
try {
|
|
72
|
+
return ok(await client.post(path(projectId, "next"), rest));
|
|
73
|
+
}
|
|
74
|
+
catch (e) {
|
|
75
|
+
return fail(e instanceof Error ? e.message : "Failed to take the next page of the site.");
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
import { SKILL_BODIES, SKILL_LIST } from "../skills.js";
|
|
4
|
+
function ok(data) {
|
|
5
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
6
|
+
}
|
|
7
|
+
function fail(message) {
|
|
8
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
9
|
+
}
|
|
10
|
+
export function registerSkillTools(server) {
|
|
11
|
+
server.tool("list_skills", toolDescription("list_skills"), {}, async () => ok(SKILL_LIST));
|
|
12
|
+
server.tool("get_skill", toolDescription("get_skill"), {
|
|
13
|
+
id: z.string().min(1).max(80),
|
|
14
|
+
}, async ({ id }) => {
|
|
15
|
+
const skill = SKILL_BODIES[id.trim().toLowerCase()];
|
|
16
|
+
if (!skill)
|
|
17
|
+
return fail(`No skill "${id}". Skills: ${Object.keys(SKILL_BODIES).join(", ")}.`);
|
|
18
|
+
return ok(skill);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
function ok(data) {
|
|
4
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
5
|
+
}
|
|
6
|
+
function fail(message) {
|
|
7
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The project as people see it: stage, every page's state, whose turn it is, and the next call.
|
|
11
|
+
* Both tools read the same state the SpecShot project home and the client portal render, through
|
|
12
|
+
* the same server handler as the hosted endpoint, so the two transports cannot disagree.
|
|
13
|
+
*/
|
|
14
|
+
export function registerStateTools(server, client) {
|
|
15
|
+
server.tool("get_project_state", toolDescription("get_project_state"), { projectId: z.string() }, async ({ projectId }) => {
|
|
16
|
+
try {
|
|
17
|
+
const data = await client.get(`/api/mcp/projects/${encodeURIComponent(projectId)}/state`);
|
|
18
|
+
return ok(data);
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
return fail(e instanceof Error ? e.message : "Failed to read the project state.");
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
server.tool("get_next_action", toolDescription("get_next_action"), { projectId: z.string() }, async ({ projectId }) => {
|
|
25
|
+
try {
|
|
26
|
+
const data = await client.get(`/api/mcp/projects/${encodeURIComponent(projectId)}/next`);
|
|
27
|
+
return ok(data);
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
return fail(e instanceof Error ? e.message : "Failed to read the next action.");
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
package/dist/tools/wireframe.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
2
3
|
function ok(data) {
|
|
3
4
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
4
5
|
}
|
|
@@ -13,7 +14,7 @@ function fail(message) {
|
|
|
13
14
|
* structural wireframe itself, and save_wireframe stores the result back.
|
|
14
15
|
*/
|
|
15
16
|
export function registerWireframeTools(server, client) {
|
|
16
|
-
server.tool("list_projects", "
|
|
17
|
+
server.tool("list_projects", toolDescription("list_projects"), {}, async () => {
|
|
17
18
|
try {
|
|
18
19
|
return ok(await client.get("/api/mcp/projects"));
|
|
19
20
|
}
|
|
@@ -21,7 +22,7 @@ export function registerWireframeTools(server, client) {
|
|
|
21
22
|
return fail(e instanceof Error ? e.message : "Failed to list projects.");
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
|
-
server.tool("get_project_intelligence", "
|
|
25
|
+
server.tool("get_project_intelligence", toolDescription("get_project_intelligence"), { projectId: z.string() }, async ({ projectId }) => {
|
|
25
26
|
try {
|
|
26
27
|
return ok(await client.get(`/api/mcp/projects/${projectId}/intelligence`));
|
|
27
28
|
}
|
|
@@ -29,7 +30,7 @@ export function registerWireframeTools(server, client) {
|
|
|
29
30
|
return fail(e instanceof Error ? e.message : "Failed to get project intelligence.");
|
|
30
31
|
}
|
|
31
32
|
});
|
|
32
|
-
server.tool("set_project_intelligence", "
|
|
33
|
+
server.tool("set_project_intelligence", toolDescription("set_project_intelligence"), {
|
|
33
34
|
projectId: z.string(),
|
|
34
35
|
businessGoals: z.string().optional(),
|
|
35
36
|
pageGoals: z.string().optional(),
|
|
@@ -51,7 +52,7 @@ export function registerWireframeTools(server, client) {
|
|
|
51
52
|
return fail(e instanceof Error ? e.message : "Failed to update the brief.");
|
|
52
53
|
}
|
|
53
54
|
});
|
|
54
|
-
server.tool("create_page", "
|
|
55
|
+
server.tool("create_page", toolDescription("create_page"), {
|
|
55
56
|
projectId: z.string(),
|
|
56
57
|
name: z.string(),
|
|
57
58
|
slug: z.string().optional(),
|
|
@@ -59,15 +60,19 @@ export function registerWireframeTools(server, client) {
|
|
|
59
60
|
// Was MISSING on stdio while lib/mcp/pages.ts already accepted it, so a
|
|
60
61
|
// foundations or components page could not be created over this transport.
|
|
61
62
|
kind: z.enum(["screens", "foundations", "components"]).optional(),
|
|
62
|
-
|
|
63
|
+
// The page's intent: hosted had both and stdio had neither, while the shared
|
|
64
|
+
// description tells the agent to record them.
|
|
65
|
+
goal: z.string().max(2000).optional(),
|
|
66
|
+
requiredSections: z.array(z.string().max(200)).max(60).optional(),
|
|
67
|
+
}, async ({ projectId, name, slug, position, kind, goal, requiredSections }) => {
|
|
63
68
|
try {
|
|
64
|
-
return ok(await client.post(`/api/mcp/projects/${projectId}/pages`, { name, slug, position, kind }));
|
|
69
|
+
return ok(await client.post(`/api/mcp/projects/${projectId}/pages`, { name, slug, position, kind, goal, requiredSections }));
|
|
65
70
|
}
|
|
66
71
|
catch (e) {
|
|
67
72
|
return fail(e instanceof Error ? e.message : "Failed to create the page.");
|
|
68
73
|
}
|
|
69
74
|
});
|
|
70
|
-
server.tool("get_wireframe_context", "
|
|
75
|
+
server.tool("get_wireframe_context", toolDescription("get_wireframe_context"), { projectId: z.string() }, async ({ projectId }) => {
|
|
71
76
|
try {
|
|
72
77
|
return ok(await client.get(`/api/mcp/projects/${projectId}/wireframe-context`));
|
|
73
78
|
}
|
|
@@ -75,14 +80,17 @@ export function registerWireframeTools(server, client) {
|
|
|
75
80
|
return fail(e instanceof Error ? e.message : "Failed to get wireframe context.");
|
|
76
81
|
}
|
|
77
82
|
});
|
|
78
|
-
server.tool("save_wireframe",
|
|
83
|
+
server.tool("save_wireframe", toolDescription("save_wireframe"), {
|
|
79
84
|
projectId: z.string(),
|
|
80
85
|
name: z.string(),
|
|
81
86
|
html: z.string(),
|
|
82
87
|
css: z.string().optional(),
|
|
83
88
|
pageType: z.string().optional(),
|
|
84
89
|
goal: z.string().optional(),
|
|
85
|
-
|
|
90
|
+
// A name, or {name, html, css}: the object form stores that section's own markup.
|
|
91
|
+
sections: z
|
|
92
|
+
.array(z.union([z.string().max(120), z.object({ name: z.string().min(1).max(120), html: z.string().optional(), css: z.string().optional() })]))
|
|
93
|
+
.optional(),
|
|
86
94
|
builderTarget: z.string().optional(),
|
|
87
95
|
// Was MISSING on stdio, so component-drift tracking was hosted-only.
|
|
88
96
|
components: z.array(z.record(z.unknown())).optional(),
|
|
@@ -109,24 +117,36 @@ export function registerWireframeTools(server, client) {
|
|
|
109
117
|
return fail(e instanceof Error ? e.message : "Failed to save wireframe.");
|
|
110
118
|
}
|
|
111
119
|
});
|
|
112
|
-
// Description
|
|
113
|
-
//
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
server.tool("publish_page_version", "
|
|
120
|
+
// Description generated from the hosted registry (tool-descriptions.ts). The description
|
|
121
|
+
// is the only thing an agent reads to decide whether to call a tool, so drift here makes
|
|
122
|
+
// the same agent behave differently on stdio than over the hosted endpoint, and this tool
|
|
123
|
+
// existed on hosted ONLY for its whole life, so a stdio agent was never told the
|
|
124
|
+
// save-and-place path exists.
|
|
125
|
+
server.tool("publish_page_version", toolDescription("publish_page_version"), {
|
|
118
126
|
projectId: z.string(),
|
|
119
|
-
|
|
120
|
-
|
|
127
|
+
// Required for a whole page; in site mode (itemId) the server builds the page and names it.
|
|
128
|
+
// The hosted handler says which is missing in a plain sentence.
|
|
129
|
+
name: z.string().optional(),
|
|
130
|
+
html: z.string().optional(),
|
|
121
131
|
css: z.string().optional(),
|
|
122
132
|
pageType: z.string().optional(),
|
|
123
133
|
goal: z.string().optional(),
|
|
124
|
-
sections: z
|
|
134
|
+
sections: z
|
|
135
|
+
.array(z.union([z.string().max(120), z.object({ name: z.string().min(1).max(120), html: z.string().optional(), css: z.string().optional() })]))
|
|
136
|
+
.optional(),
|
|
125
137
|
builderTarget: z.string().optional(),
|
|
126
138
|
components: z.array(z.record(z.unknown())).optional(),
|
|
127
139
|
pageSlug: z.string().optional(),
|
|
128
140
|
pageId: z.string().optional(),
|
|
129
141
|
viewport: z.enum(["mobile", "tablet", "desktop"]).optional(),
|
|
142
|
+
// The owner asked for a shorter page; without it a publish over the draft that would
|
|
143
|
+
// replace the page with a fragment is refused by the hosted handler.
|
|
144
|
+
allowShrink: z.boolean().optional(),
|
|
145
|
+
// Site mode: a page of an agent-driven site run (next_site_page), composed from the site kit.
|
|
146
|
+
itemId: z.string().optional(),
|
|
147
|
+
mainHtml: z.string().optional(),
|
|
148
|
+
pageCss: z.string().optional(),
|
|
149
|
+
finish: z.boolean().optional(),
|
|
130
150
|
}, async (args) => {
|
|
131
151
|
try {
|
|
132
152
|
return ok(await client.post("/api/mcp/concepts/publish", args));
|
|
@@ -135,8 +155,8 @@ export function registerWireframeTools(server, client) {
|
|
|
135
155
|
return fail(e instanceof Error ? e.message : "Failed to publish the page version.");
|
|
136
156
|
}
|
|
137
157
|
});
|
|
138
|
-
// Description
|
|
139
|
-
server.tool("list_components", "
|
|
158
|
+
// Description generated from the hosted registry (list_components).
|
|
159
|
+
server.tool("list_components", toolDescription("list_components"), { projectId: z.string() }, async ({ projectId }) => {
|
|
140
160
|
try {
|
|
141
161
|
return ok(await client.get(`/api/mcp/projects/${projectId}/components`));
|
|
142
162
|
}
|
|
@@ -144,7 +164,7 @@ export function registerWireframeTools(server, client) {
|
|
|
144
164
|
return fail(e instanceof Error ? e.message : "Failed to list components.");
|
|
145
165
|
}
|
|
146
166
|
});
|
|
147
|
-
server.tool("link_concept_page", "
|
|
167
|
+
server.tool("link_concept_page", toolDescription("link_concept_page"), {
|
|
148
168
|
conceptId: z.string(),
|
|
149
169
|
pageSlug: z.string().optional(),
|
|
150
170
|
pageId: z.string().nullable().optional(),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
function ok(data) {
|
|
4
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
5
|
+
}
|
|
6
|
+
function fail(message) {
|
|
7
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* SpecShot for WordPress: the sites connected to a project through the SpecShot plugin, with
|
|
11
|
+
* whether each runs Automatic.css, over the REST route /api/mcp/projects/[id]/wordpress. The hosted
|
|
12
|
+
* endpoint registers the same tool from apps/web/src/lib/mcp/wordpress.ts, and the description
|
|
13
|
+
* comes from the generated tool-descriptions.ts, so the two transports cannot drift.
|
|
14
|
+
*/
|
|
15
|
+
export function registerWordPressTools(server, client) {
|
|
16
|
+
server.tool("list_wordpress_sites", toolDescription("list_wordpress_sites"), { projectId: z.string() }, async ({ projectId }) => {
|
|
17
|
+
try {
|
|
18
|
+
return ok(await client.get(`/api/mcp/projects/${encodeURIComponent(projectId)}/wordpress`));
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
return fail(e instanceof Error ? e.message : "Failed to list the project's WordPress sites.");
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
package/dist/tools/workspace.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
2
3
|
function ok(data) {
|
|
3
4
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
4
5
|
}
|
|
@@ -27,21 +28,21 @@ export function registerWorkspaceTools(server, client) {
|
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
// ----------------------------------------------------------------- reads
|
|
30
|
-
server.tool("get_discovery_answers", "
|
|
31
|
-
server.tool("get_project_copy", "
|
|
32
|
-
server.tool("get_wireframes", "
|
|
33
|
-
server.tool("get_design_sections", "
|
|
34
|
-
server.tool("get_section_by_uid", "
|
|
35
|
-
server.tool("get_design_layers", "
|
|
36
|
-
server.tool("get_layer_by_uid", "
|
|
37
|
-
server.tool("get_design_versions", "
|
|
38
|
-
server.tool("get_selected_design_version", "
|
|
39
|
-
server.tool("get_comments_for_section", "
|
|
40
|
-
server.tool("get_agent_tasks", "
|
|
41
|
-
server.tool("get_project_memory", "
|
|
42
|
-
server.tool("reserve_section_uid", "
|
|
31
|
+
server.tool("get_discovery_answers", toolDescription("get_discovery_answers"), { projectId: z.string() }, async ({ projectId }) => call("get_discovery", { projectId }, "Failed to get discovery answers."));
|
|
32
|
+
server.tool("get_project_copy", toolDescription("get_project_copy"), { projectId: z.string() }, async ({ projectId }) => call("get_copy", { projectId }, "Failed to get project copy."));
|
|
33
|
+
server.tool("get_wireframes", toolDescription("get_wireframes"), { projectId: z.string() }, async ({ projectId }) => call("get_wireframes", { projectId }, "Failed to get wireframes."));
|
|
34
|
+
server.tool("get_design_sections", toolDescription("get_design_sections"), { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_sections", { projectId, conceptId }, "Failed to get sections."));
|
|
35
|
+
server.tool("get_section_by_uid", toolDescription("get_section_by_uid"), { projectId: z.string(), sectionUid: z.string() }, async ({ projectId, sectionUid }) => call("get_section", { projectId, sectionUid }, "Failed to get section."));
|
|
36
|
+
server.tool("get_design_layers", toolDescription("get_design_layers"), { projectId: z.string(), conceptId: z.string().optional(), sectionId: z.string().optional() }, async ({ projectId, conceptId, sectionId }) => call("get_layers", { projectId, conceptId, sectionId }, "Failed to get layers."));
|
|
37
|
+
server.tool("get_layer_by_uid", toolDescription("get_layer_by_uid"), { projectId: z.string(), layerUid: z.string() }, async ({ projectId, layerUid }) => call("get_layer", { projectId, layerUid }, "Failed to get layer."));
|
|
38
|
+
server.tool("get_design_versions", toolDescription("get_design_versions"), { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_design_versions", { projectId, conceptId }, "Failed to get design versions."));
|
|
39
|
+
server.tool("get_selected_design_version", toolDescription("get_selected_design_version"), { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_selected_version", { projectId, conceptId }, "Failed to get selected version."));
|
|
40
|
+
server.tool("get_comments_for_section", toolDescription("get_comments_for_section"), { projectId: z.string(), sectionUid: z.string().optional(), conceptId: z.string().optional(), status: z.string().optional() }, async ({ projectId, sectionUid, conceptId, status }) => call("get_comments", { projectId, sectionUid, conceptId, status }, "Failed to get comments."));
|
|
41
|
+
server.tool("get_agent_tasks", toolDescription("get_agent_tasks"), { projectId: z.string(), status: z.string().optional(), conceptId: z.string().optional() }, async ({ projectId, status, conceptId }) => call("get_agent_tasks", { projectId, status, conceptId }, "Failed to get agent tasks."));
|
|
42
|
+
server.tool("get_project_memory", toolDescription("get_project_memory"), { projectId: z.string() }, async ({ projectId }) => call("get_decisions", { projectId }, "Failed to get project memory."));
|
|
43
|
+
server.tool("reserve_section_uid", toolDescription("reserve_section_uid"), { projectId: z.string(), kind: z.enum(["SEC", "LYR", "CMP"]), type: z.string() }, async ({ projectId, kind, type }) => call("reserve_uid", { projectId, kind, type }, "Failed to reserve a uid."));
|
|
43
44
|
// ---------------------------------------------------------------- writes
|
|
44
|
-
server.tool("create_agent_task", "
|
|
45
|
+
server.tool("create_agent_task", toolDescription("create_agent_task"), {
|
|
45
46
|
projectId: z.string(),
|
|
46
47
|
title: z.string(),
|
|
47
48
|
description: z.string().optional(),
|
|
@@ -51,13 +52,13 @@ export function registerWorkspaceTools(server, client) {
|
|
|
51
52
|
priority: z.enum(["low", "medium", "high", "blocker"]).optional(),
|
|
52
53
|
assignedAgent: z.string().optional(),
|
|
53
54
|
}, async (args) => call("create_agent_task", args, "Failed to create agent task."));
|
|
54
|
-
server.tool("update_agent_task", "
|
|
55
|
+
server.tool("update_agent_task", toolDescription("update_agent_task"), {
|
|
55
56
|
taskId: z.string(),
|
|
56
57
|
status: z.string().optional(),
|
|
57
58
|
outputSummary: z.string().optional(),
|
|
58
59
|
versionId: z.string().optional(),
|
|
59
60
|
}, async (args) => call("update_agent_task", args, "Failed to update agent task."));
|
|
60
|
-
server.tool("create_design_version", "
|
|
61
|
+
server.tool("create_design_version", toolDescription("create_design_version"), {
|
|
61
62
|
projectId: z.string(),
|
|
62
63
|
conceptId: z.string().optional(),
|
|
63
64
|
parentVersionId: z.string().optional(),
|
|
@@ -67,28 +68,31 @@ export function registerWorkspaceTools(server, client) {
|
|
|
67
68
|
html: z.string().optional(),
|
|
68
69
|
css: z.string().optional(),
|
|
69
70
|
}, async ({ html, css, ...rest }) => call("create_design_version", { ...rest, htmlPreview: html, cssPreview: css }, "Failed to create design version."));
|
|
70
|
-
server.tool("add_design_comment", "
|
|
71
|
+
server.tool("add_design_comment", toolDescription("add_design_comment"), {
|
|
71
72
|
projectId: z.string(),
|
|
72
73
|
comment: z.string(),
|
|
73
74
|
conceptId: z.string().optional(),
|
|
74
75
|
sectionUid: z.string().optional(),
|
|
75
76
|
layerUid: z.string().optional(),
|
|
77
|
+
// The element pin (review anywhere): same-tag steps from the body, and the frame width meant.
|
|
78
|
+
elementPath: z.string().max(2000).optional(),
|
|
79
|
+
anchorWidth: z.number().int().min(200).max(4000).optional(),
|
|
76
80
|
priority: z.enum(["low", "medium", "high", "blocker"]).optional(),
|
|
77
81
|
}, async (args) => call("add_comment", args, "Failed to add comment."));
|
|
78
|
-
server.tool("resolve_design_comment",
|
|
79
|
-
server.tool("get_handoff_package", "
|
|
80
|
-
server.tool("update_design_section",
|
|
82
|
+
server.tool("resolve_design_comment", toolDescription("resolve_design_comment"), { commentId: z.string(), status: z.string().optional() }, async ({ commentId, status }) => call("resolve_comment", { commentId, status }, "Failed to resolve comment."));
|
|
83
|
+
server.tool("get_handoff_package", toolDescription("get_handoff_package"), { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_handoff", { projectId, conceptId }, "Failed to get handoff package."));
|
|
84
|
+
server.tool("update_design_section", toolDescription("update_design_section"), {
|
|
81
85
|
sectionId: z.string(),
|
|
82
86
|
name: z.string().optional(),
|
|
83
87
|
sectionOrder: z.number().int().optional(),
|
|
84
88
|
status: z.string().optional(),
|
|
85
89
|
}, async (args) => call("update_section", args, "Failed to update section."));
|
|
86
|
-
server.tool("update_design_layer", "
|
|
90
|
+
server.tool("update_design_layer", toolDescription("update_design_layer"), {
|
|
87
91
|
layerId: z.string(),
|
|
88
92
|
name: z.string().optional(),
|
|
89
93
|
hidden: z.boolean().optional(),
|
|
90
94
|
locked: z.boolean().optional(),
|
|
91
95
|
sortOrder: z.number().int().optional(),
|
|
92
96
|
}, async (args) => call("update_layer", args, "Failed to update layer."));
|
|
93
|
-
server.tool("extract_concept_sections", "
|
|
97
|
+
server.tool("extract_concept_sections", toolDescription("extract_concept_sections"), { projectId: z.string(), conceptId: z.string() }, async ({ projectId, conceptId }) => call("extract_sections", { projectId, conceptId }, "Failed to extract sections."));
|
|
94
98
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayver/specshot-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "MCP server for SpecShot \u2014 lets Claude Code, Claude Desktop, and Cursor fetch approved design concepts with brand tokens and a ready-to-build prompt.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"prepublishOnly": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
50
50
|
"zod": "^3.23.8"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|