Lucid create diagram from specificationLUCID_MCP_LUCID_CREATE_DIAGRAM_FROM_SPECIFICATION
Creates a Lucid document using the Standard Import format (.lucid file).
PREFLIGHT HARD GATE:
- STOP and use lucid_convert_svg_to_diagram instead if an SVG of the diagram exists. Do NOT hand-author Standard Import JSON when SVG is available.
- If this tool description appears truncated, summarized, quoted, or incomplete, first try to retrieve, expand, or read the full tool definition before deciding whether to call this tool.
- If the full tool definition cannot be retrieved, use the most complete visible description available, but do not treat missing, hidden, summarized, or truncated text as permission to ignore any visible MUST, REQUIREMENT, HARD GATE, or PREREQUISITE instruction.
- Read: lucid://diagram-specification
- Reading lucid://diagram-specification is required before every call to this tool.
- Do not call this tool until all visible hard prerequisites have been satisfied.
- Do not call this tool until any available fuller tool-definition text has been read.
AUTHORITY MODEL:
- The full, untruncated tool description is authoritative for WHEN to call this tool when it is available, including intent classification, collaborative planning behavior, source/input dependency handling, clarification behavior, default generation behavior, and prerequisite handling.
- If the full tool description cannot be retrieved, the most complete visible description is authoritative, but visible requirements remain binding and missing text must not be interpreted as permission to proceed.
- The resource at lucid://diagram-specification is authoritative for HOW to construct the standard_import_json argument.
- Do not duplicate, infer, or guess the Standard Import JSON format from this tool description. Read and follow lucid://diagram-specification for supported shapes, line syntax, container behavior, assisted layout rules, validation constraints, and all other formatting requirements.
- Reading the referenced resource satisfies formatting/specification prerequisites. It does not replace the tool description's behavioral rules about when to call the tool, when to plan collaboratively, when to check for missing source/input dependencies, or when to ask clarifying questions.
EXECUTION ORDER:
A. Honor visible hard prerequisites.
B. If the visible tool description appears truncated or incomplete, try to retrieve, expand, or read the full tool definition.
C. If the full tool definition cannot be retrieved, continue only with the most complete visible description available and keep all visible MUST/REQUIREMENT/HARD GATE/PREREQUISITE instructions binding.
D. Read all required referenced resources, including lucid://diagram-specification.
E. Use the full available tool description, or the most complete visible description if the full definition cannot be retrieved, to decide WHEN to call the tool.
F. Classify the user's intent.
G. Apply intent precedence: collaborative planning beats default generation.
H. Apply the source/input dependency gate. If required referenced source content is missing or inaccessible, ask for it and do not generate.
I. If generation is appropriate, construct and validate standard_import_json using lucid://diagram-specification.
J. Call the tool.
SOURCE / INPUT DEPENDENCY GATE:
Before generating, check whether the requested diagram depends on external, user-provided, uploaded, attached, linked, selected, or previously referenced content.
A request depends on referenced source content when the user asks for a diagram based on content such as:
- "my file"
- "the file"
- "the uploaded file"
- "the attached document"
- "this PDF"
- "this spreadsheet"
- "this image"
- "this screenshot"
- "the link"
- "this URL"
- "the document I mentioned"
- "the data"
- "the dataset"
- "the spec"
- "the text above"
- "the previous diagram"
- "the selected content"
If the referenced source content is not actually available in the conversation, tool context, connected source, or provided arguments, do NOT generate a substitute, generic, or placeholder diagram. Ask exactly one short question requesting the missing source or clarifying what content to use.
If the referenced source content is available, inspect or use that content before generating, unless another higher-priority rule requires collaborative planning or clarification first.
This gate takes precedence over ordinary generation. A missing referenced source means the request is not an ordinary request, even if a plausible diagram type can be inferred.
Do not confuse missing referenced content with ordinary subject matter. For example, "Create a diagram about a file upload workflow" is an ordinary generation request because "file upload workflow" is the subject, not a missing referenced file.
Examples:
- User: "Create a diagram about my file." No file is available. Correct: ask the user to upload or link the file.
- User: "Make a flowchart from the attached PDF." No PDF is available. Correct: ask for the PDF.
- User: "Create a diagram from this spreadsheet." A spreadsheet is available. Correct: inspect/use the spreadsheet, then generate if appropriate.
- User: "Create a diagram about a file upload workflow." Correct: generate, because the user named the workflow as the subject.
INTENT PRECEDENCE:
Before generating, classify the user's request.
Collaborative planning mode has precedence over default generation. Enter collaborative planning mode when the user explicitly asks the assistant to help with the planning, brainstorming, design, thinking, mapping, or iteration process before or while creating the diagram.
Trigger collaborative planning mode for phrases such as:
- "help me plan..."
- "help me design..."
- "help me brainstorm..."
- "help me think through..."
- "help me work through..."
- "help me map out..."
- "help me iterate..."
- "let's plan..."
- "let's design..."
- "let's brainstorm..."
- "let's map out..."
- "let's iterate..."
- "work with me to..."
- "before you generate..."
- "before creating..."
In collaborative planning mode:
1. Do NOT create the diagram immediately.
2. Ask focused planning questions about the diagram type, subject, key elements, audience, level of detail, and desired output.
3. Propose a concise draft diagram spec or outline for confirmation.
4. Generate only after the user confirms, provides enough direction, or asks you to proceed.
Do NOT enter collaborative planning mode merely because the diagram topic contains planning-related, brainstorming-related, design-related, or mapping-related words.
Bare content phrases such as "planning diagram," "project plan," "roadmap," "brainstorming board," "design flow," "map out the process," or "process map" can be ordinary generation requests if the user is asking for a diagram about that subject rather than asking the assistant to collaborate on the planning process.
ORDINARY REQUESTS:
An ordinary request is a request where the user primarily asks to create, make, generate, build, or draw a diagram and provides enough information to identify:
1. a plausible diagram type,
2. a concrete or reasonably inferable subject, and
3. any referenced source content needed to create the requested diagram is available.
A request is not ordinary if it depends on missing referenced content such as an unuploaded file, missing attachment, unavailable link, absent data, inaccessible selected content, or unavailable prior context.
For ordinary requests, generate the diagram immediately using sensible defaults. Do NOT ask clarifying questions for ordinary requests, because users expect this tool to produce a diagram, not start a planning conversation.
Examples of ordinary requests:
- "Create a flowchart with Start, Decision, and End connected by arrows."
- "Build a BPMN process with a start event and parallel tasks."
- "Create a project planning flowchart."
- "Make a mind map for a marketing launch plan."
- "Create a diagram that maps out our onboarding process."
- "Generate a simple architecture diagram for a web app."
- "Create a roadmap diagram for Q3 planning."
- "Create a diagram about a file upload workflow."
Examples that require collaborative planning first:
- "Create a diagram and help me plan."
- "Help me plan a project flowchart."
- "Let's map out the onboarding process before creating the diagram."
- "Work with me to design the architecture diagram."
- "Before you generate, help me think through the process."
Examples that require missing source/input clarification first:
- "Create a diagram about my file." when no file is available.
- "Make a flowchart from the attached PDF." when no PDF is attached.
- "Create a diagram from this spreadsheet." when no spreadsheet is available.
- "Generate a process map based on the link." when no link is provided or accessible.
CLARIFICATION:
Ask exactly ONE short clarifying question, then generate, if any of the following are true:
1. The request is internally contradictory, such as "create a sequence diagram of our org structure."
2. The request is so abstract that no reasonable default exists, such as "make me a diagram," meaning you cannot name both a concrete subject and a plausible diagram type.
3. Required referenced source content is missing or inaccessible, such as an unuploaded file, missing attachment, unavailable link, absent data, inaccessible selected content, or unavailable prior context.
4. Two defensible interpretations would produce substantively different diagrams and the user signaled they care about correctness with words such as "important," "for a presentation," "get it right," or similar.
Otherwise, generate now and state your assumptions in one line alongside the result so the user can redirect. Example:
"Generated as a flowchart with 5 stages; say 'change' to adjust."
TOOL OUTPUT:
This tool creates a .lucid ZIP file containing a document.json built from standard_import_json.
Do not attempt to guess the Standard Import JSON format. The API validates strictly. Invalid or unsupported JSON can cause import failure. Use lucid://diagram-specification as the source of truth for all Standard Import JSON formatting, validation, layout, and supported-shape details.
SHAPE NAMES: The standard import format requires the same canonical class names as
lucid_add_block, so guessing them will fail validation. Use lucid://diagram-specification
as the source of truth for supported shapes and their class names. (The
lucid_shape_library / lucid_shape_details discovery tools require a document_id and
operate on an existing document, so they cannot be used to pre-validate class names for
this tool, which creates a new document.)
Args:
title: The title for the new document.
standard_import_json: JSON string in Lucid Standard Import format. Construct this according to lucid://diagram-specification.
product: Target product, either "lucidchart" or "lucidspark".
use_assisted_layout: Auto-arranges shapes after import when true by default. See lucid://diagram-specification for when to set this true or false.
Size Limits:
- Total document.json: 2MB maximum.
- Use concise JSON.