trident
Create and edit collaborative architecture diagrams with any AI assistant using the Trident 2D DSL.
我該用這個嗎
品質與安全性
發現項目(5)
- HIGH
- MEDIUM在 add_annotation 中
- LOW在 get_trident_spec 中
- LOW在 get_comprehensive_example 中
- INFO在 add_annotation 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"trident": {
"command": "npx",
"args": [
"trident-mcp"
]
}
}
}可執行的套件
1.0.2stdio遠端端點
https://mcp.tridentchart.com/mcpstreamable-http它能做什麼
工具清單
工具(23)
🟢get_trident_spec
Returns the complete Trident 2D specification including grammar, syntax rules, coordinate system, containers, nodes, connections, shapes, and icon reference. Use this when you need deep understanding of the Trident DSL.
輸入結構描述
{
"type": "object",
"properties": {},
"required": []
}🟢get_generator_guide
Returns LLM-optimized instructions for generating Trident diagrams, including quick reference, critical rules (especially Y-axis!), spacing guidelines, common patterns, color conventions, and error prevention checklist. Use this before generating any Trident diagram.
輸入結構描述
{
"type": "object",
"properties": {},
"required": []
}🟢get_comprehensive_example
Returns a comprehensive Trident example demonstrating all syntax features including containers, nodes (traditional and bracket-style syntax), diamond/rectangle shapes, icons, connections with labels, routing modes, cards, and text annotations. Use this to see all features in action.
輸入結構描述
{
"type": "object",
"properties": {},
"required": []
}🟢validate_trident(diagram)
Returns a comprehensive validation checklist for Trident diagrams covering syntax rules, semantic rules, best practices, and common mistakes to avoid. Use this after generating a diagram to verify correctness.
輸入結構描述
{
"type": "object",
"properties": {
"diagram": {
"type": "string",
"description": "Optional: The Trident diagram code to include context-specific validation tips"
}
}
}🟢get_quick_start
Returns a condensed 2-minute quick-start guide with minimal working examples, core syntax reference, and key concepts. Use this for rapid learning when you need to generate simple diagrams quickly.
輸入結構描述
{
"type": "object",
"properties": {},
"required": []
}🟢open_document(token, agentId, userName)
Opens a live Trident document and returns its full contents as Trident markup DSL — the human-readable text format used to author diagrams. Use this to READ and UNDERSTAND the diagram: its structure, labels, connections, and layout. Do NOT rely on this to enumerate entity IDs for programmatic use — the DSL can be very large and the output may be truncated. To get a complete, structured list of all entity IDs and counts, use get_document_summary instead. Requires a valid access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
}
},
"required": [
"token"
]
}🟢get_document_summary(token)
Returns a complete structured summary of a Trident document as JSON: all node IDs, container IDs, connection IDs, annotation IDs, labels, and entity counts. Use this for PROGRAMMATIC OPERATIONS — it is never truncated regardless of diagram size, so you always get every entity ID. Use this before any bulk update, delete, or enumeration task. To read and understand the diagram as a human-readable diagram, use open_document instead. Requires a valid access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Access token for this document. The document ID is embedded in the token."
}
},
"required": [
"token"
]
}🟢get_recent_changes(token, since, limit)
Returns the recent change history for a live Trident document. Each entry shows who made the change, what was changed, and when. Useful for understanding what edits have been made by AI agents or human collaborators. Requires a valid access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Access token for this document. The document ID is embedded in the token."
},
"since": {
"type": "number",
"description": "Optional: Unix timestamp in milliseconds — only return changes after this time"
},
"limit": {
"type": "number",
"description": "Optional: Maximum number of entries to return (default 100, max 500)"
}
},
"required": [
"token"
]
}🟡add_node(token, agentId, userName, node, action_explanation)
Adds a new node (entity) to a live Trident document. The node appears immediately for all collaborators. Requires a valid editor access token. Before adding nodes: call open_document to understand the diagram layout and pick sensible positions; call get_document_summary to get all existing entity IDs so you can avoid duplicates. IMPORTANT: if this node belongs inside a container, pass node.container on THIS call — do NOT create the node without a container and reparent it later via update_node. Orphaned nodes appear immediately to all live collaborators and create unnecessary visual churn.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"node": {
"type": "object",
"description": "Node definition",
"properties": {
"id": {
"type": "string",
"description": "Unique ID for the node (no spaces, e.g. \"api_server\")"
},
"label": {
"type": "string",
"description": "Display label shown on the diagram"
},
"icon": {
"type": "string",
"description": "Optional: icon name from the Trident icon library"
},
"container": {
"type": "string",
"description": "ID of the container this node belongs in. Set this NOW if you know the parent — do not create the node orphaned and reparent later with update_node. Treat this as required whenever the node has a logical parent container."
},
"x": {
"type": "number",
"description": "Optional: X position in diagram units"
},
"y": {
"type": "number",
"description": "Optional: Y position (screen coords — larger Y is lower on screen)"
},
"shapeType": {
"type": "string",
"description": "Optional: shape type. Default \"rectangle\"; \"diamond\" for decisions. Registered collections: Flowchart (\"flowchart-process\", \"flowchart-rounded\", \"flowchart-stadium\", \"flowchart-cylinder\", \"flowchart-circle\", \"flowchart-double-circle\", \"flowchart-decision\", \"flowchart-hexagon\", \"flowchart-parallelogram\", \"flowchart-trapezoid\", etc.), BPMN (\"bpmn-start-event\", \"bpmn-end-event\", \"bpmn-gateway\", \"bpmn-task\", \"bpmn-user-task\", \"bpmn-subprocess\", etc.; labels render under events/gateways), UML (\"uml-class\", \"uml-interface\", \"uml-package\", \"uml-component\", \"uml-database\", \"uml-actor\", \"uml-state\", \"uml-action\", etc.), General primitives (\"circle\", \"cylinder\", \"hexagon\", \"rounded-rect\", \"parallelogram\", \"trapezoid\", etc.), or Organic (\"cloud\", \"star\", \"heart\", etc.). Unknown values fall back to rectangle."
},
"card": {
"type": "string",
"description": "Optional: markdown content for an expandable info card"
},
"color": {
"type": "string",
"description": "Optional: background/fill color (hex like \"#438DD5\" or a color name). Set on THIS call — do not add the node and recolor it later with update_node."
},
"textColor": {
"type": "string",
"description": "Optional: label text color (hex or color name), e.g. \"#FFFFFF\"."
},
"outlineColor": {
"type": "string",
"description": "Optional: border/outline color (hex or color name)."
}
},
"required": [
"id",
"label"
]
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"node"
]
}🟡update_node(token, agentId, userName, nodeId, changes, ...)
Updates properties of an existing node in a live Trident document. Only the fields you provide are changed; others are preserved. Use get_document_summary to get all node IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"nodeId": {
"type": "string",
"description": "ID of the node to update"
},
"changes": {
"type": "object",
"description": "Fields to update. Only provided fields are changed.",
"properties": {
"label": {
"type": "string"
},
"icon": {
"type": "string"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"shapeType": {
"type": "string",
"description": "Optional: shape type. \"rectangle\", \"diamond\", or a collection shape: Flowchart (\"flowchart-*\"), BPMN (\"bpmn-*\"), UML (\"uml-*\"), General primitives (\"circle\", \"cylinder\", \"hexagon\", \"rounded-rect\", etc.), or Organic (\"cloud\", \"star\", etc.)."
},
"container": {
"type": "string",
"description": "Set to a container ID to move this node into that container; set to empty string \"\" to remove from its current container"
},
"card": {
"type": "string",
"description": "Set to empty string \"\" to remove card"
},
"color": {
"type": "string",
"description": "Background color (hex or color name)"
},
"outlineColor": {
"type": "string"
},
"textColor": {
"type": "string"
}
}
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"nodeId",
"changes"
]
}🔴delete_node(token, agentId, userName, nodeId, action_explanation)
Removes a node from a live Trident document. All connections to/from this node are also removed automatically. Use get_document_summary to get all node IDs before calling this. This action is reversible via Ctrl+Z in the Trident editor. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"nodeId": {
"type": "string",
"description": "ID of the node to delete"
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"nodeId"
]
}🟡add_container(token, agentId, userName, container, action_explanation)
Adds a new container (group/swimlane) to a live Trident document. Containers visually group related nodes. Use get_document_summary to check existing container IDs before adding to avoid duplicates. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"container": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID for the container (no spaces)"
},
"label": {
"type": "string",
"description": "Display label for the container header"
},
"color": {
"type": "string",
"description": "Optional: background color (hex or color name)"
},
"outlineColor": {
"type": "string",
"description": "Optional: border/outline color (hex or color name), e.g. \"#5B7A99\" for a C4 system boundary."
},
"x": {
"type": "number",
"description": "Optional: X position"
},
"y": {
"type": "number",
"description": "Optional: Y position"
}
},
"required": [
"id",
"label"
]
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"container"
]
}🟡update_container(token, agentId, userName, containerId, changes, ...)
Updates properties of an existing container in a live Trident document. Only provided fields are changed. Use get_document_summary to get all container IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"containerId": {
"type": "string",
"description": "ID of the container to update"
},
"changes": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"color": {
"type": "string"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
}
}
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"containerId",
"changes"
]
}🔴delete_container(token, agentId, userName, containerId, deleteNodes, ...)
Removes a container from a live Trident document. By default, nodes inside are detached (kept on the diagram without a container). Pass deleteNodes: true to remove the container's nodes as well. Use get_document_summary to get all container IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"containerId": {
"type": "string",
"description": "ID of the container to delete"
},
"deleteNodes": {
"type": "boolean",
"description": "If true, also delete all nodes inside the container (default false)"
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"containerId"
]
}🟡add_connection(token, agentId, userName, connection, action_explanation)
Adds a connection (arrow/edge) between two nodes in a live Trident document. Use get_document_summary to get valid source and target node IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"connection": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Optional: unique ID; auto-generated if omitted"
},
"source": {
"type": "string",
"description": "ID of the source node"
},
"target": {
"type": "string",
"description": "ID of the target node"
},
"label": {
"type": "string",
"description": "Optional: label shown on the connection"
},
"type": {
"type": "string",
"description": "Optional: connection type (e.g. \"dotted\", \"dashed\", \"bold\", \"wave\")"
},
"routingMode": {
"type": "string",
"description": "Optional: routing algorithm (e.g. \"straight\", \"bezier\", \"orthogonal\")"
}
},
"required": [
"source",
"target"
]
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"connection"
]
}🔴delete_connection(token, agentId, userName, connectionId, source, ...)
Removes a connection from a live Trident document. Provide either the connectionId, or both source and target node IDs to find and remove the matching connection. Use get_document_summary to get all connection IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document. The document ID is embedded in the token."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"connectionId": {
"type": "string",
"description": "ID of the connection to delete (preferred)"
},
"source": {
"type": "string",
"description": "Source node ID (use with target if connectionId unknown)"
},
"target": {
"type": "string",
"description": "Target node ID (use with source if connectionId unknown)"
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId"
]
}🟢get_document_png(token)
Renders the current state of a live Trident document as a PNG image directly from the Yjs collaborative session — bypassing Firestore, which may be stale. Returns a base64-encoded PNG. Use this to visually verify that diagram edits look correct before or after making changes.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Access token for this document. The document ID is embedded in the token."
}
},
"required": [
"token"
]
}🟡add_annotation(token, agentId, userName, annotation, action_explanation)
Adds a text annotation to a live Trident document. Two visual styles: style:stickyNote (default — post-it card with colored background, good for notes/callouts) or style:textBody (plain transparent text, good for diagram titles and section labels). Ideal for architectural notes, decision records, section labels, or TODO markers. Appears immediately for all collaborators. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"annotation": {
"type": "object",
"description": "Annotation definition",
"properties": {
"id": {
"type": "string",
"description": "Unique ID (no spaces, e.g. \"note_observability\")"
},
"content": {
"type": "string",
"description": "Text content. Use \\n for line breaks."
},
"x": {
"type": "number",
"description": "X position in diagram units"
},
"y": {
"type": "number",
"description": "Y position in diagram units"
},
"width": {
"type": "number",
"description": "Optional: width in diagram units (default auto)"
},
"height": {
"type": "number",
"description": "Optional: height in diagram units (default auto)"
},
"color": {
"type": "string",
"description": "Optional: background color (hex or color name)"
},
"outlineColor": {
"type": "string",
"description": "Optional: border color"
},
"textColor": {
"type": "string",
"description": "Optional: text color"
},
"align": {
"type": "string",
"description": "Optional: text alignment — \"left\", \"center\", or \"right\""
},
"style": {
"type": "string",
"description": "Optional: \"stickyNote\" (default, post-it card look) or \"textBody\" (plain transparent text, good for titles/labels)"
},
"fontSize": {
"type": "number",
"description": "Optional: font size in points"
},
"bold": {
"type": "boolean",
"description": "Optional: bold text"
},
"italic": {
"type": "boolean",
"description": "Optional: italic text"
},
"underline": {
"type": "boolean",
"description": "Optional: underlined text"
},
"strikethrough": {
"type": "boolean",
"description": "Optional: strikethrough text"
}
},
"required": [
"id",
"content",
"x",
"y"
]
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"annotation"
]
}🟡update_annotation(token, agentId, userName, annotationId, changes, ...)
Updates an existing text annotation in a live Trident document. Only the fields you provide are changed. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"annotationId": {
"type": "string",
"description": "ID of the annotation to update"
},
"changes": {
"type": "object",
"description": "Fields to update. Only provided fields are changed.",
"properties": {
"content": {
"type": "string"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"color": {
"type": "string"
},
"outlineColor": {
"type": "string"
},
"textColor": {
"type": "string"
},
"align": {
"type": "string"
},
"style": {
"type": "string"
},
"fontSize": {
"type": "number"
},
"bold": {
"type": "boolean"
},
"italic": {
"type": "boolean"
},
"underline": {
"type": "boolean"
},
"strikethrough": {
"type": "boolean"
}
}
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"annotationId",
"changes"
]
}🔴delete_annotation(token, agentId, userName, annotationId, action_explanation)
Removes a text annotation from a live Trident document. Use get_document_summary to get all annotation IDs before calling this. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting (ask them at session start if you do not know). Shown in the collaboration presence dot as \"[agentId] working with [userName]\"."
},
"annotationId": {
"type": "string",
"description": "ID of the annotation to delete"
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation of what this action does and why (max 250 chars). Shown live to human collaborators in the AI cursor tooltip."
}
},
"required": [
"token",
"agentId",
"annotationId"
]
}🟡update_canvas_graphic(token, agentId, userName, canvasGraphicId, changes, ...)
Repositions or resizes a background image (canvas graphic) in a live Trident document. Use open_document to get the canvas graphic ID and current dimensions — it appears as: image <id> "<url>" at (x, y) width:W height:H. The position at (x, y) is the TOP-LEFT corner. USE THIS BEFORE placing many geographically-positioned nodes: if the background map is small (e.g. width < 700), scale it up so nodes have room to breathe and do not overlap. Requires a valid editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\")."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting."
},
"canvasGraphicId": {
"type": "string",
"description": "ID of the canvas graphic to update (from open_document output)."
},
"changes": {
"type": "object",
"description": "Geometry fields to update. Only provided fields are changed; all others are preserved.",
"properties": {
"x": {
"type": "number",
"description": "New top-left X position in canvas units."
},
"y": {
"type": "number",
"description": "New top-left Y position in canvas units."
},
"width": {
"type": "number",
"description": "New width in canvas units. Increase this to scale the map up."
},
"height": {
"type": "number",
"description": "New height in canvas units. Increase this to scale the map up."
},
"aspectLock": {
"type": "boolean",
"description": "Lock aspect ratio on resize (default true)."
}
},
"required": []
},
"action_explanation": {
"type": "string",
"description": "Optional: brief explanation shown live to human collaborators (max 250 chars)."
}
},
"required": [
"token",
"agentId",
"canvasGraphicId",
"changes"
]
}⚪make_suggestion(token, agentId, userName, suggestion, entityId)
Posts a visible suggestion to human collaborators watching the document WITHOUT making any changes to the diagram. Use this when you observe something worth flagging — a potential mistake, an improvement, or a question — but want the human to decide. The suggestion appears as a bold "SUGGESTION:" callout in the UI with a radar pulse animation on your presence dot for 10 seconds. Does NOT mutate the diagram. Requires a valid viewer or editor access token.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Viewer or editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting."
},
"suggestion": {
"type": "string",
"description": "The suggestion text to show to human collaborators (max 500 chars). Be concise and actionable."
},
"entityId": {
"type": "string",
"description": "ID of the node or container this suggestion relates to. Always provide this when the suggestion concerns a specific element — it moves the AI cursor to that element so collaborators know exactly what you are referring to."
}
},
"required": [
"token",
"agentId",
"userName",
"suggestion"
]
}🟢explain(token, agentId, userName, explanation, entityId)
Delivers an explanation payload to human collaborators watching the document, optionally anchored to a specific node or container. Use this when you want to explain what a diagram element represents, why it exists, or how it relates to other parts of the system — without suggesting a change. The explanation appears in the UI attributed to you. Does NOT mutate the diagram. Requires a valid viewer or editor access token. IMPORTANT: this tool automatically pauses (3–15 s, proportional to explanation length) before returning, so the human has time to read. Do NOT add your own artificial delays between explain calls — the pacing is built in.
輸入結構描述
{
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "Viewer or editor access token for this document."
},
"agentId": {
"type": "string",
"description": "YOUR AI assistant name (e.g. \"Claude.ai\", \"GitHub Copilot\"). Shown as \"[agentId] working with [userName]\" in the collaboration presence dot."
},
"userName": {
"type": "string",
"description": "First name of the human you are assisting."
},
"explanation": {
"type": "string",
"description": "The explanation text to deliver to human collaborators (max 1000 chars)."
},
"entityId": {
"type": "string",
"description": "ID of the node or container being explained. Always provide this when explaining a specific element — it moves the AI cursor to that element so collaborators can follow along."
}
},
"required": [
"token",
"agentId",
"userName",
"explanation"
]
}社群
證據