Skip to main content
Glama
lucasgerads

LeCroy Oscilloscope MCP

by lucasgerads

scope_reset

Reset the oscilloscope to factory defaults, clearing all waveforms, measurements, and settings. Use this to restore a clean baseline for new measurements.

Instructions

Reset the oscilloscope to factory defaults (*RST).

WARNING: This clears all waveforms, measurements and settings.

Transport: SCPI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for scope_reset. It calls _scope.reset() via the _run helper, sending the *RST SCPI command to reset the oscilloscope to factory defaults.
    @mcp.tool()
    def scope_reset() -> str:
        """Reset the oscilloscope to factory defaults (*RST).
    
        WARNING: This clears all waveforms, measurements and settings.
    
        Transport: SCPI
        """
        return _run(_scope.reset)
  • The underlying LeCroyScope.reset() method that sends the '*RST' SCPI write command to the oscilloscope.
    def reset(self) -> None:
        self.write("*RST")
  • The _run helper used by scope_reset to execute the reset under the VISA lock, catching errors.
    def _run(fn):
        """Execute fn() under the VISA lock, catch errors, return a string Claude can read."""
        with _visa_lock:
            try:
                result = fn()
                return str(result) if result is not None else "OK"
            except InstrumentError as e:
                return f"ERROR: {e}"
            except (SystemExit, KeyboardInterrupt):
                raise
            except BaseException as e:
                # Catch asyncio.CancelledError and any other non-fatal BaseException
                # so they don't propagate out and kill the server process.
                print(f"_run caught {type(e).__name__}: {e}", file=sys.stderr, flush=True)
                return f"ERROR ({type(e).__name__}): {e}"
  • server.py:39-43 (registration)
    FastMCP instance creation. The @mcp.tool() decorator on scope_reset (line 478) registers it as an MCP tool.
    from mcp.server.fastmcp import FastMCP
    from oscilloscope import LeCroyScope, InstrumentError
    import docs as _docs
    
    mcp = FastMCP("lecroy-scope")
Behavior4/5

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

No annotations provided, so description carries full burden. It warns about destructive effects (clears all) and mentions transport. For a simple tool with no params, this is transparent enough.

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?

Three short sentences, front-loaded with purpose, warning immediately after. No wasted words.

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

Completeness4/5

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

Tool is simple; description covers purpose, effect, and protocol. Output schema exists but return values are not described, but for a reset this is acceptable.

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, so baseline 4 applies. Description adds nothing about parameters, but none are needed.

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?

Description clearly states 'Reset the oscilloscope to factory defaults' and includes the SCPI command. This distinguishes it from all other scope tools, none of which are resets.

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

Usage Guidelines3/5

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

The warning about clearing data implies it should be used when a full reset is needed, but no explicit guidance on when to use vs alternatives. Usage is implied but not specified.

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