Skip to content

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.

8 tools that work with any pyvisa backend — AR488, pyvisa-py, NI-VISA, or simulation.

ToolDescription
server_statusReturns connected backends, discovered instruments, and server version
connect_backendConnect to a configured backend by name
disconnect_backendDisconnect a backend
discover_instrumentsScan bus and return discovered VISA addresses
instrument_querySend a query and return the response
instrument_writeSend a command (no response expected)
instrument_identifySend *IDN? and return parsed identity
instrument_resetSend *RST to reset instrument to power-on defaults

7 tools for IEEE-488 bus operations. Always registered, but return a helpful error on non-GPIB backends.

ToolDescription
instrument_clearSend Selected Device Clear (SDC) to a specific instrument
serial_pollRead status byte via serial poll
check_srqCheck if any device is asserting SRQ
bus_triggerSend Group Execute Trigger (GET) to an instrument
interface_clearAssert IFC on the GPIB bus
instrument_localReturn instrument to local (front panel) control
instrument_remotePut instrument into remote mode

3 tools for direct AR488 adapter interaction. Always registered, but return a helpful error on non-AR488 backends.

ToolDescription
ar488_commandSend any ++ command directly to the AR488 adapter
ar488_diagnosticRun ++xdiag and return diagnostic info
configure_ar488Configure 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.

ToolDescription
instrument_inspectDiscover validated properties and methods from a pymeasure driver
instrument_getRead a measurement or control property with type conversion
instrument_setSet a control property with range validation (rejects bad values)
instrument_callCall a high-level method (e.g., apply_voltage, shutdown)

5 guided workflows encode domain knowledge about bench operations.

PromptDescription
bench-initConnect to a backend, scan, and identify all instruments
troubleshoot-busSystematic diagnostic for a non-responsive device or bus
quick-measureConfigure, trigger, and read a measurement
multi-instrumentCoordinate measurements across multiple instruments
pymeasure-guidedValidated measurement workflow preferring pymeasure drivers

2 MCP resources provide protocol documentation and instrument metadata without requiring tool calls.

URIDescription
visa://protocol/commandsComplete AR488/Prologix ++ command reference
visa://pymeasure/supportedList of instruments with pymeasure driver support