claude-figjam 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/dist/tools.js +3 -3
  2. package/package.json +1 -1
package/dist/tools.js CHANGED
@@ -45,7 +45,7 @@ export const deleteNodesSchema = z.object({
45
45
  node_ids: z.union([z.string(), z.array(z.string())]),
46
46
  });
47
47
  export function registerTools(server, bridge) {
48
- server.tool("figjam_read_board", "Returns full board state: all nodes with IDs, types, positions, content, and colors.", {}, async () => {
48
+ server.tool("figjam_read_board", "Returns full board state: all nodes with IDs, types, positions, content, and colors. ALWAYS call this before making any changes to understand the current state of the board. After a page switch, call this again to confirm you are on the correct page before writing.", {}, async () => {
49
49
  try {
50
50
  const result = await bridge.execute("read_board", {});
51
51
  return {
@@ -62,7 +62,7 @@ export function registerTools(server, bridge) {
62
62
  };
63
63
  }
64
64
  });
65
- server.tool("figjam_create_node", "Creates any FigJam node (sticky, shape, text, section, table, code_block). Returns the new node ID. IMPORTANT: For multi-line content, use actual newline characters in the string — do NOT use \\n escape sequences, as they will render literally. LAYOUT RULES: Minimum vertical gap between stacked nodes = 80px. Minimum horizontal gap between pipeline stages = 328px. Use shape nodes as group containers instead of sections (sections cannot be resized programmatically). Container pattern: create container shape first (color #f0f2ff, 48px padding all sides), then child nodes on top. When a node connects both up and down in a column, place the upstream target ABOVE the hub node to separate TOP/BOTTOM slot usage. width+height must both be passed together to resize — passing only one is silently ignored.", {
65
+ server.tool("figjam_create_node", "Creates any FigJam node (sticky, shape, text, section, table, code_block). Returns the new node ID. IMPORTANT: For multi-line content, use actual newline characters in the string — do NOT use \\n escape sequences, as they will render literally. LAYOUT RULES: Use a 4px grid — all x/y positions and width/height values must be multiples of 4. Minimum vertical gap between stacked nodes = 80px. Minimum horizontal gap between pipeline stages = 328px. Use shape nodes as group containers instead of sections (sections cannot be resized programmatically). Container pattern: create container shape first (color #f0f2ff, 48px padding all sides), then child nodes on top. When a node connects both up and down in a column, place the upstream target ABOVE the hub node to separate TOP/BOTTOM slot usage. width+height must both be passed together to resize — passing only one is silently ignored. Decision nodes (branching logic) should use shape=diamond and be positioned as fan-out hubs far to the left of all their branch targets.", {
66
66
  type: z.enum([
67
67
  "sticky",
68
68
  "shape",
@@ -130,7 +130,7 @@ export function registerTools(server, bridge) {
130
130
  };
131
131
  }
132
132
  });
133
- server.tool("figjam_create_connector", "Draws a connector (arrow/line) between two existing nodes by their IDs. LAYOUT RULES: Always use style=elbowed (default) — elbowed connectors route around nodes better than curved. For fan-out from a hub node, place the hub far enough left/right that |dx| > |dy| for ALL targets, forcing clean horizontal RIGHT→LEFT routing. When adding a node to an existing column, restack ALL column nodes with even 80px gaps. CONNECTOR SEMANTICS: only use connectors for data flow relationships. Configuration or contextual relationships should be annotated in the node label instead (e.g. '⚙ configures X') — connectors imply flow.", {
133
+ server.tool("figjam_create_connector", "Draws a connector (arrow/line) between two existing nodes by their IDs. LAYOUT RULES: Always use style=elbowed (default) — elbowed connectors route around nodes better than curved. For fan-out from a hub node, place the hub far enough left/right that |dx| > |dy| for ALL targets, forcing clean horizontal routing. When adding a node to an existing column, restack ALL column nodes with even 80px gaps. Cross-layer connectors that would cut through container shapes are a layout problem — fix by repositioning nodes or using annotation instead of drawing the connector. CONNECTOR SEMANTICS: only use connectors for data flow relationships. Configuration or contextual relationships should be annotated in the node label instead (e.g. '⚙ configures X') — connectors imply flow. CONNECTOR LABELS: always label decision branch connectors with the branch condition (e.g. '2D image', 'video', '>250MB'). Label key flow transitions to describe what changed (e.g. 'registers asset', 'thumbnail_path set'). Labels are not needed on obvious convergence arrows where multiple paths merge to a single result node.", {
134
134
  from_id: z.string().describe("Source node ID"),
135
135
  to_id: z.string().describe("Target node ID"),
136
136
  style: z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-figjam",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "MCP server for live FigJam board editing from Claude Code",
5
5
  "type": "module",
6
6
  "bin": {