@scayver/specshot-mcp-server 0.11.0 → 0.14.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.
@@ -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", "Read the project's discovery questions and answers. These drive the wireframe and the design, so read them before building or revising anything.", { projectId: z.string() }, async ({ projectId }) => call("get_discovery", { projectId }, "Failed to get discovery answers."));
31
- server.tool("get_project_copy", "Read the project's per-section copywriting (headlines, body, CTAs, labels), with each block's status and version.", { projectId: z.string() }, async ({ projectId }) => call("get_copy", { projectId }, "Failed to get project copy."));
32
- server.tool("get_wireframes", "List the project's saved wireframes with type, status, and version.", { projectId: z.string() }, async ({ projectId }) => call("get_wireframes", { projectId }, "Failed to get wireframes."));
33
- server.tool("get_design_sections", "List a project's design sections, each with its stable copyable section id (for example SS-SEC-HERO-001), name, type, order, and preview. Optionally filter by conceptId.", { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_sections", { projectId, conceptId }, "Failed to get sections."));
34
- server.tool("get_section_by_uid", "Get one section by its section id (for example SS-SEC-HERO-001) together with its layers. Use this when the user points you at a specific section id.", { projectId: z.string(), sectionUid: z.string() }, async ({ projectId, sectionUid }) => call("get_section", { projectId, sectionUid }, "Failed to get section."));
35
- server.tool("get_design_layers", "List the Photoshop-style layers for a project. Optionally filter by conceptId or by sectionId (the section's uuid, from get_design_sections).", { 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."));
36
- server.tool("get_layer_by_uid", "Get one layer by its layer id (for example SS-LYR-HEADLINE-001), with its style, layout, and animation data.", { projectId: z.string(), layerUid: z.string() }, async ({ projectId, layerUid }) => call("get_layer", { projectId, layerUid }, "Failed to get layer."));
37
- server.tool("get_design_versions", "List a project's design versions (newest first), each with its version number, parent, change summary, and status. Optionally filter by conceptId.", { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_design_versions", { projectId, conceptId }, "Failed to get design versions."));
38
- server.tool("get_selected_design_version", "Get the version to build: the latest approved one, or the most recent if none is approved. Optionally scope to a conceptId.", { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_selected_version", { projectId, conceptId }, "Failed to get selected version."));
39
- server.tool("get_comments_for_section", "Read comment pins. Filter by sectionUid to get feedback on one section, by conceptId, or by status (open, in_review, accepted, rejected, resolved, needs_clarification).", { 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."));
40
- server.tool("get_agent_tasks", "List the agent tasks for a project (newest first). Filter by status or conceptId. Use this to see what work is queued, running, or waiting for the user.", { 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."));
41
- server.tool("get_project_memory", "Read the project's durable decisions and memory: approved decisions, rejected directions, and brand, copy, layout, and platform rules. Honor these in every revision.", { projectId: z.string() }, async ({ projectId }) => call("get_decisions", { projectId }, "Failed to get project memory."));
42
- server.tool("reserve_section_uid", "Reserve the next unused stable id for a project. kind is SEC (section), LYR (layer), or CMP (component); type is the section or layer type (for example hero, headline, button). Returns an id like SS-SEC-HERO-002.", { 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."));
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", "Create an agent task so the user can see what you are doing and why. Reference the exact target with sectionUid and/or layerUid. Requires a read/write API token.", {
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", "Update an agent task: set its status (draft, queued, running, waiting_for_user, completed, failed, cancelled), record an output summary, or link the design version it produced. Requires a read/write API token.", {
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", "Create a NEW design version. This never overwrites existing or approved work: it always adds a new version, so the original is preserved. Pass the built html (and optional css), a change summary, and the parentVersionId it was revised from. Requires a read/write API token.", {
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", "Add a comment pin to the design, tied to a section and/or layer id. Use this to flag something or leave a note the user will see on the canvas. Requires a read/write API token.", {
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", "Move a feedback pin through its workflow (resolved, accepted, rejected, in_review, needs_clarification). IMPORTANT: on feedback left by a CLIENT you may only set \"in_review\", to show you have picked it up. Deciding whether a client got what they asked for is a person's call, so resolved/accepted/rejected on a client comment is refused. Requires a read/write API token.", { commentId: z.string(), status: z.string().optional() }, async ({ commentId, status }) => call("resolve_comment", { commentId, status }, "Failed to resolve comment."));
79
- server.tool("get_handoff_package", "Get the complete handoff package to BUILD a project's approved concept: the brief, goals, audience, brand system, the sections with their stable ids, the per-section copy, the open feedback to resolve, the decisions and memory to honor, the acceptance criteria, and a ready-to-paste buildInstruction. This is the single read you need before implementing. Optionally target a specific conceptId.", { projectId: z.string(), conceptId: z.string().optional() }, async ({ projectId, conceptId }) => call("get_handoff", { projectId, conceptId }, "Failed to get handoff package."));
80
- server.tool("update_design_section", "Quick-edit a section: rename it, change its order, or set its status (use status \"hidden\" to hide it and \"draft\" to show it again). Pass the section's uuid (the id field from get_design_sections, not the SS-SEC uid). Requires a read/write API token.", {
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", "Edit a layer in the panel: rename, hide or show, lock or unlock, or reorder. Pass the layer's uuid (the id field from get_design_layers, not the SS-LYR uid). A locked layer only accepts an unlock. Requires a read/write API token.", {
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", "Turn an existing design concept into stable, selectable sections and layers with copyable ids (SS-SEC-*, SS-LYR-*), derived from the concept's own structure. Idempotent: safe to call more than once, it will not duplicate. It also does NOT re-derive: on a concept that already has sections it leaves them alone, because section names come from the rendered preview in a browser and there is no browser on the server. The way to keep sections in step with a revision is to pass `sections` to publish_page_version and revise_wireframe. Requires a read/write token.", { projectId: z.string(), conceptId: z.string() }, async ({ projectId, conceptId }) => call("extract_sections", { projectId, conceptId }, "Failed to extract 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.11.0",
3
+ "version": "0.14.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.0.0",
49
+ "@modelcontextprotocol/sdk": "^1.32.2",
50
50
  "zod": "^3.23.8"
51
51
  },
52
52
  "devDependencies": {