scope_list_resources
List all visible VISA instrument resources on your computer to identify the connection string needed to connect to a LeCroy oscilloscope, whether connected via LAN or USB.
Instructions
List all VISA instrument resources visible on this computer (LAN and USB).
Use this to find the resource string for scope_connect. A LAN-connected LeCroy typically appears as: TCPIP0::192.168.1.111::inst0::INSTR A USB-connected LeCroy typically appears as: USB0::0x05FF::0x1023::::INSTR
If nothing appears, try scope_scan to search the network directly.
Transport: local
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:242-265 (handler)The MCP tool 'scope_list_resources' lists all VISA instrument resources visible on the computer (LAN and USB). It calls LeCroyScope.list_resources() and returns the results as a newline-separated string.
def scope_list_resources() -> str: """List all VISA instrument resources visible on this computer (LAN and USB). Use this to find the resource string for scope_connect. A LAN-connected LeCroy typically appears as: TCPIP0::192.168.1.111::inst0::INSTR A USB-connected LeCroy typically appears as: USB0::0x05FF::0x1023::<serial>::INSTR If nothing appears, try scope_scan to search the network directly. Transport: local """ try: resources = LeCroyScope.list_resources() if not resources: return ( "No VISA resources found. Check the oscilloscope is powered on and connected.\n" "Try scope_scan to search the network, or connect directly:\n" " scope_connect('TCPIP0::192.168.1.111::inst0::INSTR')" ) return "\n".join(resources) except Exception as e: return f"ERROR: {e}" - oscilloscope.py:300-306 (helper)LeCroyScope.list_resources() static method — the underlying implementation that queries pyvisa for available VISA resources.
@staticmethod def list_resources() -> list[str]: """Return all VISA resources visible on this PC (LAN and USB).""" rm = pyvisa.ResourceManager("@py") resources = list(rm.list_resources()) rm.close() return resources - server.py:241-242 (registration)The tool is registered as an MCP tool via the @mcp.tool() decorator on the scope_list_resources function.
@mcp.tool() def scope_list_resources() -> str: