Troubleshooting
Protect unsaved work first. If a drawing has unsaved changes, close
does not close or save it: it returns closed:false,
requiresConfirmation:true, and warnings. Save first to keep the changes,
or use options.discardUnsavedChanges:true only after user approval to close
and discard them. Don’t close/reopen Visio or restart the server as a generic
response to a failed tool call.
Connection and startup
| Symptom | Check |
|---|---|
dnx not found |
Install the SDK, not only the runtime, from setup. Reopen the client/terminal; check dotnet --list-sdks and dnx --help. |
| Package source unavailable | Check the configured NuGet sources, package availability, network, and approved proxy settings. Don’t disable certificate/security checks or copy a private feed from an old guide. |
| Tools missing | Confirm the server is enabled in the active client/session. In VS Code, use MCP: List Servers and inspect its output and tool selection. |
| Visio not open | Open the intended existing drawing or create a requested new one through manage_document; either starts Visio if needed. manage_visio action="open" can also start the application explicitly. Tool discovery alone doesn’t launch it. |
| Slow first request | Package download, desktop startup, and local discovery are separate stages. Inspect output/logs to locate the delay. |
Files and sessions
| Symptom | Check |
|---|---|
| Operation stalls | Inspect Visio for sign-in, recovery, or modal prompts and resolve them yourself. Check actual drawing state before retrying. |
COM_OPEN_CONFLICT |
Read the error’s path/details and document-open evidence. A generic conflict or already-open drawing isn’t proof of a lock. Reuse an already-retained drawing; save work before closing anything. |
| Access denied | Check client approval and Windows permissions; the output root isn’t a filesystem sandbox. |
FILE_ALREADY_EXISTS |
Choose a new destination or explicitly authorize overwrite. Save and export defaults differ. |
| Changes absent from disk | Ask for an explicit save and confirm its returned path. An export doesn’t save the source. |
| Save error names a staged recovery file | Preserve that file. Open the exact reported recovery path, inspect it, and save to an available destination; don’t recreate or delete it blindly. |
| Retained ID no longer works | IDs belong to the server session. After external closure or restart, reopen the intended existing file with manage_document action="open" (which starts Visio if needed) and use its newly returned diagramId. Don’t create a replacement drawing to recover an existing-document task. Unsaved state isn’t automatically recovered; if the intended file is unknown or was never saved, report that rather than guessing. |
Document-open failures
Failed native opens can report the requested read-only, macro-disabled, and no-workspace flags, plus whether a matching document was observed in the current Visio instance and whether that document was read-only. These are limited, best-effort observations after the failure, not a scan of every Visio process. Unavailable matching-document observations may be omitted; omission doesn’t mean false.
openNativeFailure classifies explicit native sharing, lock, or access-denied
errors as SharingViolation, LockViolation, or AccessDenied. Other native
failures remain Unknown. Neither documentAlreadyOpen:true nor a generic
conflict proves that another document caused the failure or holds a file lock.
Diagnostic collection doesn’t retry the open, probe write access, recover, save, or close anything. Inspect the intended drawing and available evidence before deciding what to do; don’t discard work or create a replacement drawing just to clear an open error. Tool error details can still contain paths and native error text; review them before sharing.
Drawing results
| Symptom | Check |
|---|---|
| Custom shapes missing | Follow Custom shapes: place files in My Shapes or a folder registered under File > Options > Advanced > File Locations (Stencils or Templates), explicitly refresh the index, then search. |
| Stencil listed but masters absent | Legacy .vss/.vst files can be listed without discoverable masters. Use a modern-format copy. Don’t open the stencil as the target drawing. |
| Missing or unexpected content | Read and compare against the complete source. Validation checks visual defects, not process completeness. |
| Partial large-diagram answer | Narrow the read or retrieve all issued chunks. Omitted nested fields aren’t proof of absence. |
| Edit fails midway | Inspect what changed before requesting a smaller correction. A successful response can still contain operation failures. |
| Add-ins or macros don’t run | Visio events may be turned off. See Add-ins and macros don’t run. |
Add-ins and macros don’t run
MCP automation suppresses Visio events. Add-ins, macros, and some built-in drawing features may not run or update the diagram as they do during manual editing.
When Visio supports the session-only automation API, suppression doesn’t change the saved Enable Automation Events preference. Older builds or unavailable automation interfaces fall back to the application setting, which can persist in your profile. Local startup logs identify whether the server used session-only or legacy event configuration.
Suppression applies to the Visio instance, not one drawing; closing a drawing doesn’t reset it. After MCP work, stop the server and close/relaunch Visio to end session-only suppression, saving any work you intend to keep first. Session-only suppression doesn’t restore a saved event preference disabled by an earlier version. If the saved preference is disabled, restore it manually:
- Stop the MCP server.
- In Visio, go to File > Options > Advanced.
- Under General, select Enable Automation Events, and then select OK.
Using MCP again can turn events off again. You don’t need to disable your add-ins.
Collect diagnostics
Use Configuration for log locations and settings. In VS Code, use MCP: List Servers, select the server, and choose Show Output, including when no log file was created.
Review and sanitize excerpts before sharing. See Help and feedback for what to include and private security-reporting guidance.