@markasso/mcp 0.7.7 → 0.7.8
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 +1 -1
- package/dist/markasso-mcp.js +9 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Bump `version` in `mcp/package.json` and both `version` fields in `mcp/server.js
|
|
|
98
98
|
| `diagram_open` | Open a `.markasso` file or a markasso.it share link |
|
|
99
99
|
| `diagram_read` | Describe nodes (key, kind, label, position, size), connections (with their ids) and layout warnings |
|
|
100
100
|
| `diagram_add_nodes` | Add nodes by key: rectangle, ellipse, rhombus, text, flowchart symbols, icons, with an optional font size. Nodes without a size fit their label |
|
|
101
|
-
| `diagram_connect` | Connect nodes by key: label and its font size,
|
|
101
|
+
| `diagram_connect` | Connect nodes by key: label and its font size, elbow (default) or straight routing, arrowhead styles, dashed |
|
|
102
102
|
| `diagram_update` | Change a node's label, color, font size, position or size |
|
|
103
103
|
| `diagram_update_edge` | Change a connection's label, label font size, routing, heads, dash or color |
|
|
104
104
|
| `diagram_disconnect` | Remove connections (by id or by from/to), keeping the nodes |
|
package/dist/markasso-mcp.js
CHANGED
|
@@ -4595,7 +4595,7 @@ function escapeXml(str) {
|
|
|
4595
4595
|
}
|
|
4596
4596
|
//#endregion
|
|
4597
4597
|
//#region package.json
|
|
4598
|
-
var version = "0.7.
|
|
4598
|
+
var version = "0.7.8";
|
|
4599
4599
|
//#endregion
|
|
4600
4600
|
//#region ../src/core/layout.ts
|
|
4601
4601
|
/** Orders vertices without recursion, preserving input order when unconstrained. */
|
|
@@ -6369,7 +6369,7 @@ var Diagram = class {
|
|
|
6369
6369
|
startElementId: fromId,
|
|
6370
6370
|
endElementId: toId,
|
|
6371
6371
|
arrowHead: spec.arrow ?? "end",
|
|
6372
|
-
routing: spec.routing ?? "
|
|
6372
|
+
routing: spec.routing ?? "elbow",
|
|
6373
6373
|
...spec.dashed && { strokeStyle: "dashed" },
|
|
6374
6374
|
...spec.startHead && { startHeadStyle: spec.startHead },
|
|
6375
6375
|
...spec.endHead && { endHeadStyle: spec.endHead },
|
|
@@ -6743,7 +6743,7 @@ function describeDiagram(diagram) {
|
|
|
6743
6743
|
if (el.label) parts.push(quote(el.label));
|
|
6744
6744
|
const edgeFont = customFontSize(el);
|
|
6745
6745
|
if (edgeFont !== void 0) parts.push(`font ${edgeFont}px`);
|
|
6746
|
-
if (el.routing
|
|
6746
|
+
if (el.routing !== "elbow") parts.push("straight");
|
|
6747
6747
|
if (el.strokeStyle && el.strokeStyle !== "solid") parts.push(el.strokeStyle);
|
|
6748
6748
|
if (el.type === "line" && el.arrowHead !== "end") parts.push(`arrow:${el.arrowHead ?? "none"}`);
|
|
6749
6749
|
parts.push(`(id ${edgeShortId(el)})`);
|
|
@@ -7597,7 +7597,8 @@ function findWarnings(diagram) {
|
|
|
7597
7597
|
name: {
|
|
7598
7598
|
id: edgeShortId(el),
|
|
7599
7599
|
from,
|
|
7600
|
-
to
|
|
7600
|
+
to,
|
|
7601
|
+
routing: el.routing ?? "straight"
|
|
7601
7602
|
},
|
|
7602
7603
|
el,
|
|
7603
7604
|
segments: segmentsOf(polylineOf(el, elements))
|
|
@@ -7693,7 +7694,8 @@ function formatWarnings(w) {
|
|
|
7693
7694
|
if (w.labelOverlaps.length > 0) lines.push(`- Labels overlapping: ${listed(w.labelOverlaps.map((o) => "node" in o ? `label of ${edgeText(o.edge)} on node ${o.node}` : `labels of ${edgeText(o.edge)} and ${edgeText(o.label)}`))}. Hint: move the nodes apart or shorten the labels.`);
|
|
7694
7695
|
if (w.crossings.length > 0) {
|
|
7695
7696
|
const total = w.crossings.reduce((sum, c) => sum + c.count, 0);
|
|
7696
|
-
|
|
7697
|
+
const hint = w.crossings.some((c) => c.a.routing === "straight" || c.b.routing === "straight") ? "try the other layout direction, or routing \"elbow\" on the straight ones (diagram_update_edge)" : "try the other layout direction";
|
|
7698
|
+
lines.push(`- Crossing connections (${total}): ${listed(w.crossings.map((c) => `${edgeText(c.a)} x ${edgeText(c.b)}`))}. Hint: ${hint}.`);
|
|
7697
7699
|
}
|
|
7698
7700
|
if (w.nodeOverlaps.length > 0) lines.push(`- Overlapping nodes: ${listed(w.nodeOverlaps.map(([a, b]) => `${a} and ${b}`))}. Hint: run diagram_layout, or move them (diagram_update x/y).`);
|
|
7699
7701
|
return lines.length > 0 ? `Warnings:\n${lines.join("\n")}` : "";
|
|
@@ -7797,7 +7799,7 @@ var edgeSchema = z.object({
|
|
|
7797
7799
|
from: z.string().describe("Key of the start node"),
|
|
7798
7800
|
to: z.string().describe("Key of the end node"),
|
|
7799
7801
|
label: z.string().max(200).optional().describe("Text on the connection"),
|
|
7800
|
-
routing: z.enum(["straight", "elbow"]).optional().describe("elbow = orthogonal route
|
|
7802
|
+
routing: z.enum(["straight", "elbow"]).optional().describe("elbow (default) = orthogonal route with rounded turns, for flowcharts and architecture; straight = direct line, for radial or dense diagrams"),
|
|
7801
7803
|
arrow: z.enum([
|
|
7802
7804
|
"none",
|
|
7803
7805
|
"start",
|
|
@@ -8010,7 +8012,7 @@ server.registerTool("diagram_update_edge", {
|
|
|
8010
8012
|
inputSchema: {
|
|
8011
8013
|
...edgeRefSchema,
|
|
8012
8014
|
newLabel: z.string().max(200).optional().describe("New label"),
|
|
8013
|
-
routing: edgeSchema.shape.routing,
|
|
8015
|
+
routing: edgeSchema.shape.routing.describe("elbow = orthogonal route with rounded turns; straight = direct line. Omit to keep the current routing"),
|
|
8014
8016
|
arrow: edgeSchema.shape.arrow,
|
|
8015
8017
|
startHead: edgeSchema.shape.startHead,
|
|
8016
8018
|
endHead: edgeSchema.shape.endHead,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markasso/mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"mcpName": "io.github.AlbertoBarrago/markasso",
|
|
5
5
|
"description": "MCP server that lets AI agents create, read and edit Markasso diagrams, offline or live on a shared board",
|
|
6
6
|
"type": "module",
|