Important
Microsoft Visio Desktop MCP is in preview. Preview software is for evaluation and isn't intended for production environments or critical workloads. Features might change before general availability.
You get the best results when you give the agent a clear source, a specific task, and a way to check its work.
Use a frontier model
For the best results, select a frontier model in your AI client, such as GPT-5.5 or later. This matters most for complex diagrams and multi-step changes, where the model has to plan many shapes, connections, and checks. Less capable models are more likely to miss steps or stop partway through.
Give the agent a source
Provide the information that the diagram should show: IDs, exact names, types, owners, relationships, and groupings. A file or table works best.
With a clear source, the agent can build what's there and check its work against it. Without one, it has to guess, and it might add steps or systems that don't exist. Ask the agent to tell you about missing information instead of filling the gaps.
Start from your template
To match the structure and format that your organization prefers, give the agent a starting template or a blank Visio file to build on. For example, use one that already has your page size, theme, title block, and layers.
Ask the agent to create the diagram from your template, or to open your starting file and add the content to its first page:
Create a new diagram from C:\Templates\Architecture.vstx, and build the application diagram on its first page.
If you start from a blank .vsdx file, ask the agent to save the result as a new file, so your starting file stays blank.
Be specific
Say what you want, and what must not change.
| Instead of | Try |
|---|---|
| "Redesign this diagram and make it look better." | "Add Fraud Review between Order Service and Payment Provider. Keep every other shape, connector, and label." |
| "The diagram doesn't look right." | "Make the Order Service shape wider so its label fits. Keep its position and connectors." |
| "Put these apps in a box." | "Create a container named Platform, and make App A, App B, and App C members of it." |
Write a complete prompt
A good prompt usually covers these points:
| Include | Example |
|---|---|
| Source | "Use the attached inventory as the only source." |
| Scope | "Create one diagram with exactly these 6 components and 5 connections." |
| Structure | "Landscape page, left to right, external systems outside the Platform container." |
| Rules | "Follow our process-mapping rules: decisions are diamonds labeled as questions, every branch has a Yes or No label, and step names start with a verb." |
| Shapes | "Use the shapes from our ApprovedArchitecture stencil, and show me which stencil you found before you draw." |
| Target | "Open Visio, create a new diagram, and use its first page." For an existing diagram, name the file and page. |
| Saving | "Save it as a new file named app-context.vsdx. Don't replace any existing file." |
| Check | "Read it back, compare it with the source, check the layout, and tell me about any differences." |
Ask for real structure
Shapes that are just near each other aren't connected. When structure matters, ask for connectors with arrows and labels, real containers or swimlanes with actual members, and Shape Data. Real structure stays intact when you edit the diagram, and the agent can read it later. Ask the agent to read the diagram and confirm these connections and members.
Build large diagrams in steps
- Understand. Ask the agent to list the items, connections, and groups from your source.
- Plan. Review the list and the shapes it will use.
- Create. Build the first version.
- Check. Read it back and compare it with the source.
- Refine. Make focused layout and formatting changes.
- Review and save. Look over the diagram in Visio, and then ask the agent to save the version you approve.
The diagram can stay unsaved while you review it. Creating, changing, or checking a diagram doesn't save it.
Ask the agent to check its work
A finished task doesn't mean the diagram is correct. End your prompt with something the agent can check, such as:
Confirm that the diagram has 6 components, 5 connectors, and 4 components inside the Platform container.
The layout check finds visual problems, and reading the diagram back confirms the content. The layout check doesn't fix problems by itself, so ask the agent to fix what it finds and check again.
Protect your files
- Work on a copy of important diagrams.
- Say whether to save over the original, save a new copy, or leave the changes unsaved.
- You don't need to close a diagram between requests. Don't edit it yourself while the agent is working, and don't open another copy in a separate Visio window.
- Don't let more than one agent work on the same diagram at the same time.
- Use new file names for exports you want to keep. Exporting doesn't save the diagram.
Reuse your instructions
If you repeat the same rules in every prompt, put them in a custom agent instead. Then your prompt only describes the task. See Create a custom agent.
Review the result
Before you share a diagram, open it in Visio and check that:
- Labels, IDs, and Shape Data are correct.
- Connectors point the right way, between the right shapes.
- Shapes are in the right containers or swimlanes.
- Text is easy to read and nothing overlaps.
- Custom shapes still work as expected after they're resized and reconnected.
- Parts that you didn't ask to change are unchanged.
- The approved version is saved where you want it.
Related topics
Create, read, and update diagrams