Skip to main content
Glama
lucasgerads

LeCroy Oscilloscope MCP

by lucasgerads

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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}"
  • 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:
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Describes what the tool lists (visible resources) and gives transport (local), implying a read-only operation. With no annotations, this is adequate but could state non-destructiveness explicitly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise, front-loaded with purpose and usage, efficient examples, and fallback instruction. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a parameterless tool with annotations absent and output schema present. Links to siblings scope_connect and scope_scan, making context fully self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in schema, so description need not add parameter info. It compensates by explaining output format with examples, adding value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it lists VISA instrument resources on LAN and USB, with specific examples of resource strings. It distinguishes itself from sibling tools like scope_scan, which searches the network directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use this to find the resource string for scope_connect, and advises to try scope_scan if nothing appears, providing clear when-to-use and alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lucasgerads/lecroy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server