Reference Overview
mcpyvisa exposes 22 tools, 5 prompts, and 2 resources through the Model Context Protocol. This section documents every parameter, return value, and edge case.
When pymeasure is installed (pip install mcpyvisa[pymeasure]), 4 additional tools become available for validated instrument control through pymeasure drivers. These protect instruments from out-of-range commands while providing type-safe, high-level access.
Tools by category
Section titled “Tools by category”Universal Tools
Section titled “Universal Tools”8 tools that work with any pyvisa backend — AR488, pyvisa-py, NI-VISA, or simulation.
| Tool | Description |
|---|---|
server_status | Returns connected backends, discovered instruments, and server version |
connect_backend | Connect to a configured backend by name |
disconnect_backend | Disconnect a backend |
discover_instruments | Scan bus and return discovered VISA addresses |
instrument_query | Send a query and return the response |
instrument_write | Send a command (no response expected) |
instrument_identify | Send *IDN? and return parsed identity |
instrument_reset | Send *RST to reset instrument to power-on defaults |
GPIB Tools
Section titled “GPIB Tools”7 tools for IEEE-488 bus operations. Always registered, but return a helpful error on non-GPIB backends.
| Tool | Description |
|---|---|
instrument_clear | Send Selected Device Clear (SDC) to a specific instrument |
serial_poll | Read status byte via serial poll |
check_srq | Check if any device is asserting SRQ |
bus_trigger | Send Group Execute Trigger (GET) to an instrument |
interface_clear | Assert IFC on the GPIB bus |
instrument_local | Return instrument to local (front panel) control |
instrument_remote | Put instrument into remote mode |
AR488 Tools
Section titled “AR488 Tools”3 tools for direct AR488 adapter interaction. Always registered, but return a helpful error on non-AR488 backends.
| Tool | Description |
|---|---|
ar488_command | Send any ++ command directly to the AR488 adapter |
ar488_diagnostic | Run ++xdiag and return diagnostic info |
configure_ar488 | Configure AR488 adapter settings (timeout, EOS, EOI, auto mode) |
pymeasure Tools (requires mcpyvisa[pymeasure])
Section titled “pymeasure Tools (requires mcpyvisa[pymeasure])”4 tools for validated instrument control. Only registered when pymeasure is installed.
| Tool | Description |
|---|---|
instrument_inspect | Discover validated properties and methods from a pymeasure driver |
instrument_get | Read a measurement or control property with type conversion |
instrument_set | Set a control property with range validation (rejects bad values) |
instrument_call | Call a high-level method (e.g., apply_voltage, shutdown) |
Prompts
Section titled “Prompts”5 guided workflows encode domain knowledge about bench operations.
| Prompt | Description |
|---|---|
bench-init | Connect to a backend, scan, and identify all instruments |
troubleshoot-bus | Systematic diagnostic for a non-responsive device or bus |
quick-measure | Configure, trigger, and read a measurement |
multi-instrument | Coordinate measurements across multiple instruments |
pymeasure-guided | Validated measurement workflow preferring pymeasure drivers |
Resources
Section titled “Resources”2 MCP resources provide protocol documentation and instrument metadata without requiring tool calls.
| URI | Description |
|---|---|
visa://protocol/commands | Complete AR488/Prologix ++ command reference |
visa://pymeasure/supported | List of instruments with pymeasure driver support |