{
  "getGuidelines": {
    "description": "Rule loading tool for {{displayName}} / MasterGo scopes. design_page loads the initial page-generation rules, so do not call this tool as a separate page pre-step. Only when design_page later requests chart rules, call scope=[\"charts-import\"] as an incremental load without reloading other page scopes. Default scope is [\"page-generate\"]. Available scopes: page-generate / charts-import / component-import / component-generate / variable-import / variable-generate. component-generate is only for agent_create_component master component/component-set creation; unless the user explicitly asks to create a master component, component set, variant, reusable component, or extract as component, do not load component-generate.",
    "inputSchema": "Optional: scope (string array, items in page-generate / charts-import / component-import / component-generate / variable-import / variable-generate). Default [\"page-generate\"]. Multiple scopes are concatenated and a Final Hard Gate section is appended."
  },
  "createPage": {
    "description": "[INTERNAL submission tool · Only call after design_page has produced final HTML] Submits one completed page to the {{pluginName}} canvas. Provide exactly one top-level input: code for generated-page HTML, or filePath only when the user explicitly asks to import an existing local HTML file as a new page. For local-file sync, overwrite, update, or push to an existing canvas root, use agent_sync_design. Never create a temporary file for page delivery.\n\nReverse Transpilation Warning: Never submit Vue/React business code with dynamic bindings or framework directives. Convert it to pure static HTML first.",
    "code": "[Required for generated-page delivery; mutually exclusive with filePath] Non-empty complete page HTML, passed as the top-level code field.",
    "filePath": "[Only for explicit import-as-new-page requests; mutually exclusive with code] Absolute path of an existing local HTML file. Use agent_sync_design for synchronization or overwrite.",
    "projectDir": "[Optional] Absolute path of the user's current workspace root. If omitted, the tool reuses the active design_page session, then the most recent workspace from the same tool flow, and finally the MCP process working directory.",
    "documentId": "[Strictly optional; do not ask the user for it] Inherit the design_page target document. If that flow did not specify one, omit this field and use the connected document.",
    "documentPageId": "[Strictly optional; do not ask the user for it] Inherit the design_page target page. If that flow did not specify one, omit this field and use the page that was current when design_page started."
  },
  "updateNode": {
    "description": "Default tool for edits on existing nodes. Text, styles, layout, component props, and most local structural adjustments should use agent_update_node first. However, replacing image content / swapping an image / changing <img src> must use agent_replace_node; agent_update_node is only appropriate for image node styles such as size, radius, border, shadow, and layout. Before editing, call get_selection_node and use its returned node code as the baseline: change only the requested properties and preserve every untouched style, class, and attribute. Never omit existing width, height, color, font-size, font-weight, or line-height just because they are unchanged. To remove a style, explicitly write `property: initial`; omission means preserve. Two legal usage patterns, pick whichever fits:\n  1) **Edit parent container's own style/attrs only** (preserve all children): pass the root container with an empty body. Example: to change a container's background to black, send `<div data-node-id=\"X\" style=\"background:#000\"></div>` — no placeholder text or comments needed, the system auto-preserves all existing children.\n  2) **Edit parent + rebuild/adjust child structure**: pass the complete subtree including every child you want to keep. The system applies a precise diff.",
    "targetNodeId": "[Optional] One target layer ID (e.g. 123:456) or a MasterGo goto URL containing its layer_id. If omitted, the tool only derives the ID from code data-node-id and blocks the update when none is available.",
    "code": "[Required] Modified HTML fragment. MUST include data-node-id.",
    "projectDir": "[Optional] Absolute path of the user workspace root. Recommended for local images. If omitted, the tool reuses the most recent workspace from the same tool flow and prepares the image internally in this call; no separate service-start step is needed. Retry with projectDir only when the tool reports that no reusable context exists."
  },
  "replaceNode": {
    "description": "Use this tool only when the user explicitly asks to replace a specific node, icon, or image. Replacing image content / swapping an image / changing <img src> must use this tool, not agent_update_node. Icons should follow FontAwesome, and image replacement should follow the <img src=\"{{keyword}}\" /> or local relative image path convention.",
    "targetNodeId": "[Optional] One target layer ID (e.g. 123:456) or a MasterGo goto URL containing its layer_id. If omitted, the tool only derives the ID from code data-node-id and blocks the replacement when none is available.",
    "code": "[Required] New HTML code. Will fully replace the target node content.",
    "projectDir": "[Optional] Absolute path of the user workspace root. Recommended for local images. If omitted, the tool reuses the most recent workspace from the same tool flow and prepares the image internally in this call; no separate service-start step is needed. Retry with projectDir only when no reusable context exists."
  },
  "removeVariable": {
    "description": "Remove variable: dedicated tool for dangerous delete operations. Deletes variables in the current MasterGo file and does not use agent_update_variables; tool name is agent_remove_variable. Prefer id; without id, collection/collectionId + name + type are required to avoid accidental deletion. The first call auto-loads the variable-generate rules.",
    "id": "[Recommended] Variable ID to delete.",
    "collection": "[Required without id] Variable collection name.",
    "collectionId": "[Optional] Variable collection ID; can replace collection.",
    "name": "[Required without id] Variable name.",
    "type": "[Required without id] Variable type, such as COLOR, PAINT, NUMBER.",
    "variables": "[Optional] Batch delete array. Each item should provide id, or collection/collectionId + name + type."
  },
  "syncToDesign": {
    "description": "Perform a [Full Sync]: overwrite an existing MasterGo canvas root node with a complete local static HTML file / local code file. Before calling, page-generate.md MUST be loaded and followed, and the local HTML must satisfy the page generation / reverse-transpilation protocol. The file must contain exactly one root element whose data-node-id matches an existing canvas root. If that root does not exist, the tool leaves the canvas unchanged and asks whether to create a new page through submit_page_to_canvas. Only call this when the user explicitly asks to sync/overwrite a local HTML file, local code file, or specified file path into the canvas/design root node, or explicitly answers yes/confirm after the assistant asks about this exact operation. Do NOT use this for new page generation, page delivery, or sending generated output to MasterGo; in those scenarios use design_page → submit_page_to_canvas. Never reuse an earlier confirmation and never auto-sync after local edits.",
    "targetNodeId": "[Optional validation] One root node ID or a MasterGo goto URL containing its layer_id. The tool always derives the sync target from data-node-id on the file's only root element. If supplied, this value must match the file root ID or the tool stops before contacting the canvas. It never defaults to the current selection.",
    "filePath": "[Required] Absolute path of local static HTML file (found in {{docDir}}/...). Tool auto-reads the file. NEVER pass .vue/.tsx paths!",
    "userConfirmed": "[Required] Whether the user explicitly confirmed this exact operation: full-sync/overwrite a local HTML or local code file into a canvas root node. Confirm every call again; only pass true when the current user turn asks for this local-file overwrite operation or answers yes/confirm after the assistant asks about this exact operation.",
    "userConfirmationText": "[Required] The user's verbatim confirmation for this exact local-file full sync, such as \"overwrite the canvas with this local HTML file\", \"sync this local code file to the design root\", \"yes\", or \"confirm\". Do not use casual page-delivery wording like \"sync to MasterGo\", old confirmations, summaries, or model inference."
  },
  "getSelectionNode": {
    "description": "Read the latest HTML and layer information for the currently selected or specified MasterGo layer. Root and child HTML are returned directly. Local images, SVGs, and similar assets receive a short-lived Asset Session for an immediately following canvas edit. This tool preserves d2c component semantics (enableComponentSyntax=true, may output <ui-component>) and is for canvas context sync and subsequent canvas edits only; it is NOT a frontend-code export tool. Only use get_frontend_code when the user explicitly asks to get code, export frontend code, generate runnable HTML, or save code into a frontend project. Do NOT chain agent_update_node / agent_replace_node / agent_sync_design after this call unless the user has issued an explicit modification request.",
    "projectDir": "[Required] The absolute path of the user's current workspace root directory.",
    "targetNodeId": "[Optional] A layer ID, a MasterGo goto URL, or user text containing one or more such URLs. layer_id values are parsed automatically; multiple IDs trigger a batch read. If omitted, the current selection is read.",
    "targetNodeIds": "[Optional] Batch targets; each item may be a layer ID or MasterGo goto URL. Targets are parsed, deduplicated, and read in appearance order. Do not mix links from different files."
  },
  "getFrontendCode": {
    "description": "Frontend code export tool. Call only when the user asks to get/export frontend code, generate runnable HTML, or save into a frontend project. For reading canvas context or preparing design edits, use get_selection_node. Confirm frontendFramework before calling; if the user did not specify a format, ask them to choose one of html / vue / react / wxml / angular / android / json instead of defaulting to html. Non-JSON output is exported directly by mcp-client into projectDir by default; outDir selects a directory inside the project, while writeToFile=false returns code only. JSON is returned directly by default and is exported only when writeToFile=true or outDir is supplied. Frontend code and its associated assets are never persisted by the Server. For saved HTML, the response includes a screenshot path, frontend-code-review, and frontendReviewSession; repair the saved HTML based on these materials. Later fidelity feedback must incrementally edit the existing file and must not call this tool again to overwrite it.",
    "projectDir": "[Required] The absolute path of the user's current workspace root directory. outDir must resolve inside this directory.",
    "targetNodeId": "[Optional] A layer ID, a MasterGo goto URL, or user text containing one or more such URLs. layer_id values are parsed automatically; multiple IDs trigger a batch read. If omitted, the current selection is read.",
    "targetNodeIds": "[Optional] Batch targets; each item may be a layer ID or MasterGo goto URL. Targets are parsed, deduplicated, and read in appearance order. Do not mix links from different files.",
    "frontendFramework": "[Required intent] Frontend code format: html / vue / react / wxml / angular / android / json. If the user did not specify it, ask the user to choose one; the tool no longer defaults to html.",
    "outDir": "[Optional] Export directory inside the project. Relative paths are resolved from projectDir and may not escape it. Non-JSON output defaults to projectDir; supplying outDir also opts JSON into file export.",
    "fileName": "[Optional] Output file name, e.g. index.html, index.vue, index.jsx, or node.json. If omitted, the file name is generated from the node name.",
    "writeToFile": "[Optional] Whether to write project files. Non-JSON defaults to true and writes to projectDir or outDir; false returns code only. JSON defaults to false and is saved only when true or outDir is supplied. Nothing is written to the Server."
  },
  "getScreenshot": {
    "description": "Persist a rendered preview (PNG by default) of the currently selected or specified MasterGo layer and return its local path. Call it only when the user explicitly asks to save/export a screenshot or requests visual reference from an existing design. User-confirmed QA after component-page submission must use review_generated_page for transient image delivery and must not use this persistence tool as a substitute. This tool does not return base64 image content. For routine context reads or small edits use get_selection_node.",
    "projectDir": "[Required] Absolute path of the workspace root. Screenshots are written under {{docDir}}/design/{documentId}/{rootId}/screenshot in this directory.",
    "targetNodeId": "[Optional] A layer ID, a MasterGo goto URL, or user text containing one or more such URLs. layer_id values are parsed automatically; multiple IDs trigger batch screenshots. If omitted, the current selection is exported.",
    "targetNodeIds": "[Optional] Batch targets; each item may be a layer ID or MasterGo goto URL. Targets are parsed, deduplicated, and exported in appearance order. Do not mix links from different files.",
    "scale": "[Optional] Screenshot export scale from 0.5 to 4. Defaults to 1; pass 0.5 for half-size, 2 for 2x, or 4 for 4x."
  },
  "reviewGeneratedPage": {
    "description": "User-confirmed QA tool for a generated component page. Call it only after submit_page_to_canvas returns a qaReviewId, asks the assistant to consult the user, and the user explicitly chooses yes/review or no/skip in the current turn. decision=yes fetches the target screenshot and returns it as transient image content without writing it into the project; it permits inspection and reporting only, never automatic repair. decision=no clears the QA state and ends the task. Never use it for free-draw pages.",
    "projectDir": "[Required] The same absolute workspace path used for the completed component-page generation.",
    "qaReviewId": "[Required] The exact QA session ID returned by submit_page_to_canvas. Never reuse an ID from another task.",
    "decision": "[Required] Pass yes or no only from the user's explicit current-turn answer; the model must not decide for the user."
  },
  "generateImage": {
    "description": "Generated-image asset persistence tool. Use only when the user explicitly asks for AI/model-generated images, original image assets, or illustrations. For normal page imagery, write <img src=\"{{keyword}}\" /> and do not call this tool. The tool accepts sourcePath from an already generated local image and saves it in the Server generated-images:// scope; only an explicit outputDir adds a user-owned project export. To replace an image node on canvas, call agent_replace_node afterward and use the resource URL returned by this tool directly as img src.",
    "projectDir": "[Required] Absolute path of the user's workspace root. outputDir must resolve inside this directory.",
    "sourcePath": "[Required] Local image file path already written by the image-generation tool. Absolute and relative paths are both accepted. The tool reads this file and copies it into the target directory.",
    "fileName": "[Optional] Target file name, e.g. hero-cat.png. If omitted, the tool uses a content hash. Existing files are never overwritten; suffixes like -2 and -3 are appended automatically.",
    "outputDir": "[Optional] Save directory. Relative paths are resolved against projectDir. If omitted, images are saved to {{docDir}}/generated-images.",
    "mimeType": "[Optional] Image MIME type, e.g. image/png, image/jpeg, image/webp. Used when it cannot be inferred from the sourcePath extension."
  },
  "createComponent": {
    "description": "Create a MasterGo master component or component set (variant). Only when the user explicitly asks to create a master component/component set/variant/reusable component/extract as component, load get_guidelines(scope=[\"component-generate\",\"page-generate\"]) first, then call this tool. Otherwise, do not call this tool and do not load component-generate. Do not use component-generate for team/component-library page generation. This tool rejects ordinary HTML that does not declare data-type=\"component\" or data-type=\"component-set\".",
    "code": "Pure HTML string of the component. Root node must include data-type=\"component\" or \"component-set\". For component-set, variant nodes must be direct children and variant attributes must be declared with flat data-variant-* fields.",
    "projectDir": "[Optional] Absolute path of the user workspace root. When provided, the tool asks the Server Workspace for the current file's local-{documentId} variable snapshot; if found, the variable-import rules are loaded automatically so master components reference var(...) tokens instead of literal values, preserving design-system consistency."
  },
  "getDesignDiff": {
    "description": "Compare a user-owned local HTML file explicitly supplied through filePath with the current MasterGo canvas design. Returns a JSON Diff describing changed layers or styles.",
    "projectDir": "[Required] The absolute path of the user's current workspace root directory.",
    "targetNodeId": "[Optional] One MasterGo layer ID (e.g. 123:456) or a MasterGo goto URL containing its layer_id. Only one layer can be compared per call; if omitted, the current selection is read.",
    "filePath": "[Required] Absolute path to the user-supplied local HTML file that should be used as the comparison source.",
    "syncType": "[Optional] Sync direction, must be codeSyncDesign (code syncs to design) or designSyncCode (design syncs to code)."
  },
  "getCodeList": {
    "description": "Get a list of all available code items",
    "inputSchema": "Get code list without parameters"
  },
  "design": {
    "description": "[FIRST TOOL FOR PAGE GENERATION] Call immediately for page generation. An explicit current request for free-draw or component-library overrides the default. Otherwise design_page reuses the current MasterGo document's last successfully submitted source and asks the two-way question only when no preference exists. Component-library revalidates and reuses the last ordered exact library IDs; it asks again if any ID is unavailable. It inspects persisted snapshots but never performs a remote fetch. Missing snapshots are delegated to get_component_info. The successful submission persists the new default.",
    "requirement": "Interface requirement description, e.g., \"a beautiful login page\", \"a modern dashboard interface\", etc.",
    "projectDir": "[Optional] Absolute path of the user workspace root. Required when reading or writing {{docDir}} snapshots (variables / component library).",
    "designSource": "[Use for an explicit switch] One of free-draw / component-library. Pass only when the current user explicitly chooses a source or answers the first-use question; omit for ordinary continuation so the tool can reuse the current document preference.",
    "userConfirmedDesignSource": "[Explicit argument confirmation] Whether designSource came from the current user's confirmation. Do not set true for a remembered default; explicit source wording in the current requirement is recognized directly.",
    "userConfirmedTeamLibrary": "[Required for component-library mode] True only after design_page listed the current-file local and subscribed remote candidates and the user selected one or more exact options. Fall back to manually typed complete option labels only when the host cannot present multi-select.",
    "userTeamLibraryConfirmationText": "[Component-library confirmation] Prefer the host multi-select's user confirmation text containing every selected complete option label. Each teamLibraries item may instead carry its selected complete label as userConfirmationText.",
    "needsCharts": "[Optional] Pass true when chart capability is already known on the initial design_page call. If charts are discovered only after the initial rules are returned, do not call design_page again; incrementally load charts-import as instructed.",
    "teamLibraryName": "[Legacy single-library compatibility] Complete component-library name bound to one selected option. Prefer teamLibraries for component-library pages.",
    "teamLibraryId": "[Legacy single-library compatibility] Exact selected component-library ID: local-{documentId} for the current file or the subscribed remote ID. Prefer teamLibraries for component-library pages.",
    "teamLibraries": "[Recommended for component-library mode] Ordered array that may mix the current-file local library and subscribed remote libraries. Each item contains the option-bound exact teamLibraryId and teamLibraryName plus optional selected complete label as userConfirmationText; a shared userTeamLibraryConfirmationText is also accepted. Array order controls duplicate-name priority.",
    "teamLibrarySnapshotMode": "[When any selected library has a complete local snapshot] use-local keeps existing snapshots and delegates missing libraries to get_component_info; refresh delegates re-fetching all selected libraries to get_component_info. design_page never performs the remote fetch itself.",
    "componentSnapshotsPrepared": "[Only after page-generation get_component_info completes] Keep the original design_page requirement, source, ordered libraries, and user confirmation unchanged and pass true to resume generation. Exact persisted snapshots are verified; do not fabricate this flag.",
    "documentId": "[Strictly optional; do not ask for it] Pass only when the user supplies it or explicitly requests a target document. Otherwise omit it and use the connected document. A supplied ID must match the document hosting the connected plugin.",
    "documentPageId": "[Strictly optional; do not ask for it] Pass only when the user supplies it or explicitly requests a target page. Otherwise omit it and use the page current when design_page starts. When supplied, the placeholder and final page are pinned to that page."
  },
  "getUserInfo": {
    "description": "Get current logged-in user information, including quotas, teams, etc.",
    "inputSchema": "Get current user information"
  },
  "getVersion": {
    "description": "Version information: call this tool when the user asks for the {{displayName}} MCP / current MCP / {{displayName}} MCP version.",
    "inputSchema": "Get version information without parameters"
  },
  "getCode": {
    "description": "[Specific Scenario] Get code from the {{pluginName}} via contentId. For regular selected-node reads, prefer get_selection_node; for browser-renderable frontend HTML, use get_frontend_code.",
    "contentId": "Instruction to copy layers from the {{pluginName}} (contentId)",
    "projectDir": "[Required] The absolute path of the user's current workspace root directory.",
    "outDir": "[Required] The absolute path to save code and resources"
  },
  "getLibraryList": {
    "description": "[COMPONENT-LIBRARY LIST AND PUBLIC SINGLE-SELECTION ENTRYPOINT, NOT PAGE GENERATION] Returns the one current-file local identity (exact local-{documentId}) and subscribed remote libraries. Public fetch remains a single-source flow. Page generation is independently orchestrated by design_page, which combines the current-file local candidate and subscribed remote candidates in one ordered multi-select. Stop after listing when the user only asks what is available. Never scan persisted local-* directories, auto-select a library, or auto-call catalog/details.",
    "inputSchema": "Optional projectDir binds the selection prompt to the current workspace.",
    "projectDir": "[Recommended] Absolute workspace root used to isolate the library-selection confirmation by project."
  },
  "getComponentInfo": {
    "description": "[COMPONENT-LIBRARY SNAPSHOT PREPARATION] During page generation, call only with the exact arguments returned by design_page. Its ordered teamLibraries may mix the current-file local-{documentId} identity with subscribed remote libraries; each exact ID is prepared independently without scanning sibling snapshots. Public use keeps the get_library_list single-source flow. A pure persistence flow stops when complete; page-generation preparation returns to the original design_page call.",
    "projectDir": "[Required] Absolute path of the user's workspace root (for persistence).",
    "teamLibraryId": "[Required for remote libraries] Exact remote ID explicitly selected by the user from get_library_list candidates, or already authorized by design_page for page generation. The persisted directory and meta.teamLibrary.id must match exactly. For a local library, pass local-{documentId}, or a bare documentId only when catalog has the exact matching local entry.",
    "teamLibraryName": "[Optional] Complete library name. It never auto-matches an ID; for a remote library it must exactly match the name paired with teamLibraryId in the current subscription list. Use \"当前文件\" for current-file local components.",
    "userTeamLibraryConfirmationText": "[Component-library confirmation evidence] For page generation, use the host multi-select confirmation containing every selected complete option label and no question. Each teamLibraries item may instead carry its selected complete label as userConfirmationText. Preserve the exact arguments returned by design_page.",
    "teamLibraries": "[Ordered page component-library allowlist] May mix local-{documentId} with subscribed remote IDs. Each item carries the exact option-bound teamLibraryId and teamLibraryName plus optional selected complete label as userConfirmationText. One call prepares all snapshots in selection order.",
    "teamLibrarySnapshotMode": "[Required when persisted snapshots exist] use-local reuses existing snapshots and fetches only missing libraries; refresh re-fetches and overwrites all selected libraries.",
    "purpose": "[Invocation purpose] library-persistence is an independent persistence flow and stops when complete. page-generation is allowed only with exact design_page-provided arguments and must return to the original design_page flow without selecting libraries again.",
    "refresh": "[Optional, default false] Set true after the user chooses to re-fetch. If the same ID already has a complete snapshot, overwriteExisting must also be true.",
    "overwriteExisting": "[Optional, default false] Valid only with refresh: true. Set true only after the user explicitly chooses to overwrite/re-fetch the same library."
  },
  "getComponentCatalog": {
    "description": "[COMPONENT LIST, NOT LIBRARY PERSISTENCE] Reads index.md from a prepared snapshot without parsing component JSON or sending atlas images. Never call for a pure fetch/persist request. Call only when the user explicitly requests a component list or design_page has confirmed component-based generation; a list-only request stops after this result.",
    "projectDir": "[Required] Absolute workspace root path.",
    "teamLibraryId": "[Required] Exact locked library ID: a remote top-level directory ID, or local-{documentId} for local storage (a bare documentId is accepted only through an exact catalog mapping). Pass it on every read; never scan or auto-select another persisted library.",
    "teamLibraryName": "[Optional] Team library name. When present, it must identify the same library as teamLibraryId."
  },
  "getComponentDetails": {
    "description": "[COMPONENT DETAILS, NOT LIBRARY PERSISTENCE] Reads every component JSON file selected for the page's actual needs, with no artificial count limit, and returns structural fields only. Call only for an explicit component-detail request or after design_page selects page candidates; never call for a pure fetch/persist request.",
    "projectDir": "[Required] Absolute workspace root path.",
    "teamLibraryId": "[Required] The same user-confirmed team library ID passed to get_component_catalog. Do not switch persisted libraries.",
    "teamLibraryName": "[Optional] Team library name. When present, it must identify the same library as teamLibraryId.",
    "componentFiles": "[Required] Every .json file name selected from get_component_catalog for the page's actual needs, with no artificial count limit, for example [\"001-button.json\", \"002-card.json\"]."
  },
  "getLibraryAssets": {
    "description": "[PAGE COMPONENT-GENERATION RESOURCES, NOT LIBRARY PERSISTENCE] Strictly reads icons.json and variable.json from the selected Server Workspace snapshot. Never call for a pure fetch/persist request. During page generation, only design_page-selected allowlist IDs are permitted; never scan every library or read sibling libraries.",
    "projectDir": "[Required] Absolute path to the current workspace root.",
    "teamLibraryId": "[Required] Exactly the same team library ID used for get_component_catalog/get_component_details.",
    "teamLibraryName": "[Optional] Team library name. When present, it must identify the same library as teamLibraryId."
  },
  "getVariables": {
    "description": "Get all local variables in the current MasterGo file. This reads the current file only, not remote team libraries. Returns documentName, documentId, and variables (the same batch array format accepted by agent_update_variables); also accepts API responses that return a bare array. On success, writes the variables field to the Server-managed local-{documentId} team-library snapshot.",
    "inputSchema": "Required: projectDir (absolute workspace root for writing the snapshot).",
    "projectDir": "[Required] Absolute path of the workspace root, used to register or resolve the Server Workspace where the local-{documentId} snapshot is stored."
  },
  "getFonts": {
    "description": "Font list: filters MasterGo's available fonts to team and organization fonts and writes a { name, family, style } array to {{docDir}}/fonts/fonts.json. Use name for lookup and family for CSS font-family. C2D falls back to Inter Regular when a font cannot be matched or loaded.",
    "projectDir": "Required absolute workspace root. The font snapshot is written to {{docDir}}/fonts/fonts.json."
  },
  "updateVariables": {
    "description": "Update variables: create, modify, or reorder variables in the current MasterGo file. Deleting variables must use agent_remove_variable. Fixed flow: call get_variables first; when creating a token set, submit base variables first, then this tool automatically refreshes and persists the latest variable.json on success before semantic/reference variables are submitted. If the auto-refresh fails, call get_variables manually. The first call auto-loads the variable-generate rules.",
    "inputSchema": "Required: projectDir. Provide filePath, variables, or operations when needed. If none is provided, reads the variable.json most recently persisted by get_variables.",
    "projectDir": "[Required] Absolute path of the user's workspace root.",
    "filePath": "[Optional] Variable JSON path inside projectDir, either absolute or relative to projectDir. Files outside the workspace are rejected. Typically use the Server Workspace variable.json returned by get_variables.",
    "variables": "[Optional] Variable array in the same format written by get_variables; { variables: [...] } is also accepted.",
    "operations": "[Optional] Operation array for createVariable/updateVariable/moveVariable and other non-snapshot operations. Use agent_remove_variable for deletes."
  },
  "removeNode": {
    "description": "Delete nodes in the MasterGo canvas. Supports specifying an ID via targetNodeId, or defaults to the currently selected layer if no ID is provided.",
    "targetNodeId": "[Optional] One target layer ID (e.g. 123:456) or a MasterGo goto URL containing its layer_id. Multiple links are rejected; only when omitted does the tool use the current selection."
  }
}
