USBTMC MCP Server
This server lets you discover, connect to, and control multiple USBTMC instruments over USB using SCPI commands, with extra utilities for Keysight and Tektronix devices.
Discover USB instruments with
usbtmc_list_devicesConnect to and disconnect from up to 16 devices using
usbtmc_connect/usbtmc_disconnectList active connections with
usbtmc_list_connected_devicesSend SCPI commands with
usbtmc_sendQuery instruments and read responses with
usbtmc_query/usbtmc_receiveClear device buffers to recover from communication errors with
usbtmc_clearUnlock Keysight modular instruments from firmware mode to USBTMC mode with
usbtmc_unlock_keysight_devicesCapture screenshots from Keysight/Agilent oscilloscopes with
usbtmc_screenshot_keysight_displayCapture screenshots from Tektronix oscilloscopes with
usbtmc_screenshot_tektronix_display
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@USBTMC MCP Serverlist all connected USBTMC devices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
USBTMC MCP Server
A Model Context Protocol (MCP) server for controlling multiple USBTMC (USB Test and Measurement Class) devices simultaneously using SCPI commands.
Features
Multi-Device Support: Connect and control up to 16 instruments at once.
Unified Interface: Use standard SCPI commands via a simplified MCP toolset.
Keysight Support: Includes specialized tools to unlock Keysight modular instruments from firmware mode to USBTMC mode.
Screenshot Capture: Take screenshots from Keysight/Agilent and Tektronix oscilloscopes.
State Management: Automatic tracking of device IDs and connection states.
Related MCP server: sdm-mcp
Requirements
Python >= 3.13
mcp[cli]2.x (v0.2.0 and later; useusbtmc-lite-mcp0.1.x if you are pinned tomcp1.x)
Windows Additional Setup
This project uses libUSB as a backend for USB communication. On Windows, you need to install a compatible USB driver for your device using Zadig.
Download and run Zadig
Select your target USB device from the dropdown (enable Options → List All Devices if it does not appear)
Select WinUSB as the driver and click Replace Driver
Note: Replacing the driver will remove the device's original functionality (e.g., HID recognition). To restore it, uninstall the driver from Device Manager and reconnect the device.
Installation
Using uv (recommended):
uv pip install usbtmc-lite-mcpOr via pip:
pip install usbtmc-lite-mcpOr from source:
git clone https://github.com/NaoNaoMe/usbtmc-lite-mcp.git
cd usbtmc-lite-mcp
uv syncConfiguration
Claude Desktop Config
Add the server to your claude_desktop_config.json:
{
"mcpServers": {
"usbtmc-lite-mcp": {
"command": "uvx",
"args": [
"usbtmc-lite-mcp"
]
}
}
}Tools Overview
Connection
usbtmc_list_devices: Scan the USB bus for available USBTMC instruments.usbtmc_list_connected_devices: List all currently active device connections.usbtmc_connect: Establish a connection to a specific device (returns adevice_id).usbtmc_disconnect: Close the connection to a device.
Communication
usbtmc_query: Send a SCPI query (e.g.,*IDN?) and receive the response.usbtmc_send: Send a SCPI command.usbtmc_receive: Manually reads the response.usbtmc_clear: Clear device buffers and reset communication state.
Keysight / Tektronix Utilities
usbtmc_unlock_keysight_devices: Switch Keysight modular instruments to USBTMC mode.usbtmc_screenshot_keysight_display: Capture a screenshot from a Keysight/Agilent oscilloscope.usbtmc_screenshot_tektronix_display: Capture a screenshot from a Tektronix oscilloscope.
Example Workflow
List Devices: Call
usbtmc_list_devicesto find your instrument's serial number.Connect: Call
usbtmc_connectwith theserial_number. It will return adevice_id(e.g.,0).Identify: Call
usbtmc_querywithdevice_id: 0andcommand: "*IDN?".Configure: Call
usbtmc_sendto set parameters.Disconnect: Call
usbtmc_disconnectwhen finished.
License
This project is licensed under the MIT License — see the LICENSE file for details.
Available Tools
11 toolsusbtmc_clearAIdempotent
Clear the device input/output buffers and reset communication state.
Use this to recover from communication errors or stuck states.
Args: params (DeviceIdInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect()
Returns: dict: Result containing: - success (bool): Whether the clear operation was successful - device_id (int): The target device_id - message (str): Success or error message
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate the tool is mutating, idempotent, and non-destructive. The description adds valuable context about what gets cleared (input/output buffers) and that it resets communication state. It also discloses the return structure. This goes beyond annotations and provides useful behavioral insight, so 4 is warranted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is succinct and well-structured. It leads with the core purpose, then usage, then parameters, then return values. Every sentence serves a purpose, and there is no fluff. It is appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple single-parameter nature, the description covers all essential aspects: what the tool does, when to use it, the parameter meaning, and the return value. Annotations provide additional safety cues. The description is complete and leaves no significant gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite the schema description coverage being 0%, the description explicitly explains the parameter: 'device_id (int): The unique identifier returned by usbtmc_connect().' It fully conveys the meaning and origin of the parameter, effectively compensating for any schema gaps. The single parameter is well-documented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action: 'Clear the device input/output buffers and reset communication state.' This is a specific verb and resource, distinguishing it from sibling tools like send/receive/query. The purpose is unambiguous and immediately understandable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context: 'Use this to recover from communication errors or stuck states.' This tells when to use the tool, but it does not mention when not to use or contrast with alternatives. Since it gives clear context without explicit exclusions, a score of 4 is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_connectA
Connect to a USBTMC device and receive a device_id for subsequent operations.
The device_id is used to identify the connection in all subsequent operations. If multiple devices match the criteria, the connection will fail - provide more specific criteria to uniquely identify the target device.
Args: params (ConnectInput): Connection parameters containing: - manufacturer (str, optional): Device manufacturer name to match - product (str, optional): Device product name to match - serial_number (str, optional): Unique device serial number (most specific)
Returns: dict: Result containing on success: - device_id (int): Unique identifier for this connection (use for all subsequent operations) - manufacturer (str): Device manufacturer name - product (str): Device product/model name - serial_number (str): Device serial number - message (str): Success message
On error:
- error (str): Error message describing the failureNote: Maximum 16 simultaneous connections are supported.
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=false), the description discloses important behaviors: the need for a unique match, failure when multiple devices match, and a limit of 16 simultaneous connections. This adds meaningful context that annotations do not cover.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear opening statement, then Args, Returns, and Note sections. It is slightly longer than necessary but every section adds valuable information without redundant fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers success and error return formats, the purpose of device_id, uniqueness requirements, and connection limits. Given the tool's complexity (nested parameters, failure modes, connection lifecycle), this is a complete and self-sufficient description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description compensates by listing all three parameters (manufacturer, product, serial_number) and their roles, including noting serial_number as 'most specific.' While schema descriptions already contain similar details, the description provides the functional context needed to choose criteria.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb and resource: 'Connect to a USBTMC device and receive a device_id for subsequent operations.' It distinguishes itself from sibling tools by focusing on establishing a connection, not listing, sending, or disconnecting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (before subsequent operations) and provides guidance on how to avoid failure: 'If multiple devices match the criteria, the connection will fail - provide more specific criteria.' It does not explicitly mention alternatives, but the context is clear enough without them.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_disconnectAIdempotent
Disconnect from a specific USBTMC device.
Args: params (DeviceIdInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect()
Returns: dict: Result containing: - success (bool): Whether the disconnection was successful - device_id (int): The disconnected device_id - product (str): Product name of the disconnected device - message (str): Success or error message
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=true. The description adds return value details (success flag, disconnected device_id, product name, message) but does not disclose further behavioral traits such as failure modes or whether the connection becomes unusable. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with Args and Returns sections, making it easy to scan. It is reasonably concise, with each statement providing useful information. Minor redundancy exists with the schema description, but the format is effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple disconnect operation with one parameter, the description covers the input meaning, return values, and success/error messaging. It lacks explicit preconditions or edge-case behavior, but given the annotations and the parameter hint about usbtmc_connect(), it is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explicitly documents the required parameter device_id, explaining it as the unique identifier returned by usbtmc_connect(). It also describes the return structure, which clarifies the parameter's effect. Even though the schema also has a description, the signal indicates low schema coverage, and this description compensates well.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Disconnect) and resource (specific USBTMC device), making its purpose unambiguous. It does not explicitly distinguish itself from siblings beyond the verb, but the scope is clear and specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parameter description says the device_id is returned by usbtmc_connect(), which implies the tool is used after a connection is established. However, there is no explicit when-to-use or when-not-to-use guidance, nor any mention of alternatives, so usage context is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_list_connected_devicesARead-onlyIdempotent
List all currently connected (active) USBTMC devices.
Returns: dict: Result containing: - count (int): Number of connected devices - devices (list[dict]): List of connected device info, each containing: - device_id (int): Unique identifier for the connection - manufacturer (str): Device manufacturer name - product (str): Device product/model name - serial_number (str): Device serial number
Example: >>> result = usbtmc_list_connected_devices() >>> result { "count": 1, "devices": [ { "device_id": 0, "manufacturer": "Keysight Technologies", "product": "DSO-X 3024A", "serial_number": "MY12345678" } ] }
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds value by detailing the return structure and providing an example, which clarifies expected output behavior. No contradictory or missing behavioral traits are evident.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured, leading with the main action, followed by a clear Returns section and a concrete example. Every sentence contributes useful information without being overly verbose, making it efficient for an agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, read-only, output schema present), the description is complete. It fully specifies the returned fields (count, devices with device_id, manufacturer, product, serial_number) and includes an illustrative example, leaving no major gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
This tool has zero parameters, so the baseline is 4. The description correctly avoids parameter details, and the input schema (empty properties) confirms no parameters need explanation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all currently connected (active) USBTMC devices', which is a specific verb+resource. However, it does not explicitly distinguish this from the sibling tool 'usbtmc_list_devices', though the 'connected' qualifier provides some differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving currently connected USBTMC devices, but provides no explicit when-to-use guidance or alternatives. It does not mention when to prefer this over 'usbtmc_list_devices' or other siblings, leaving the agent to infer the use case.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_list_devicesARead-onlyIdempotent
List all available USBTMC devices connected via USB.
This is typically the first step in the workflow:
usbtmc_list_devices() - Discover available devices
usbtmc_connect() - Connect to a device and get device_id
Use device_id for operations (send/query/etc.)
usbtmc_disconnect() - Close connection when done
Returns: dict: Result containing: - count (int): Number of devices found - devices (list[dict]): List of device info dictionaries, each containing: - manufacturer (str): Device manufacturer name - product (str): Device product/model name - serial_number (str): Unique device serial number
Example: >>> result = usbtmc_list_devices() >>> result { "count": 1, "devices": [ { "manufacturer": "Keysight Technologies", "product": "DSO-X 3024A", "serial_number": "MY12345678" } ] }
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the return format and example but no additional behavioral traits such as edge cases or limitations. Given the annotation coverage, the description provides minimal extra behavioral information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear first sentence, workflow list, and example. It is slightly verbose for a parameterless tool, but the extra information about return format and workflow is useful. It earns its length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple (no parameters), and the description fully covers purpose, when to use, return structure, and an example. Despite the existence of an output schema, the description itself provides sufficient detail for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description need not explain parameter semantics; the baseline of 4 applies. The schema confirms no parameters, and the description correctly focuses on return values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'List all available USBTMC devices connected via USB.' It also provides a workflow showing it's the discovery step. However, it doesn't explicitly differentiate from the sibling tool usbtmc_list_connected_devices, which may have overlapping purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes a numbered workflow: 'usbtmc_list_devices() - Discover available devices' and labels it as 'typically the first step.' This gives clear context for when to use it, but it does not mention when not to use it or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_queryA
Send a SCPI command and immediately receive the response.
Use for QUERY commands (with '?') that request information from the device. For SET commands (without '?'), use usbtmc_send() instead.
This is a convenience function combining send and receive operations.
Args: params (QueryInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect() - command (str): SCPI command string to send (usually ends with '?') - wait_time (float): Time to wait between send and receive (default: 0.1s) - max_bytes (int): Maximum bytes to read (default: 1024)
Returns: dict: Result containing: - success (bool): Whether the query was successful - device_id (int): The target device_id - command (str): The command that was sent - response (str or None): Response data, or None if no data/timeout - message (str): Success or error message
Note: Wait time recommendations: - Simple queries (*IDN?, status): 0.1s (default) - Querying existing measurements: 0.1s - After changing settings: 0.5-2.0s
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses key behavioral details beyond the minimal annotations: it is a convenience function combining send and receive, waits between operations, and returns None if no data/timeout. It also provides wait-time recommendations for different command types, offering practical behavioral context that the annotations do not convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a concise opening sentence, explicit usage rule, Args/Returns sections, and a practical Note. Every sentence adds relevant information—nothing is redundant or filler—and the most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one nested parameter object and a non-trivial timing behavior, the description is complete: it covers purpose, when to use, all input fields with defaults, return fields, and time-wait recommendations. It gives an agent everything needed to select and invoke the tool correctly without guessing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Even though the schema description coverage is reported as 0%, the tool description thoroughly compensates by enumerating all four fields (device_id, command, wait_time, max_bytes), their meanings, defaults, and even usage guidance for wait_time. This adds clear semantic value beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a clear, specific verb and resource: 'Send a SCPI command and immediately receive the response.' It explicitly frames the tool as the query variant and distinguishes it from usbtmc_send() by mentioning SCPI commands with '?'. This makes the tool's purpose unambiguous and differentiates it from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description states exactly when to use this tool: 'Use for QUERY commands (with '?') that request information from the device.' It also explicitly names the alternative: 'For SET commands (without '?'), use usbtmc_send() instead.' This direct when-to-use/when-not-to-use guidance is exemplary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_receiveARead-only
Receive data from a specific USBTMC device.
Args: params (ReceiveInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect() - max_bytes (int): Maximum bytes to read (default: 1024)
Returns: dict: Result containing: - success (bool): Whether data was received - device_id (int): The target device_id - data (str or None): Received data string, or None if no data/timeout - message (str): Success or error message
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds behavioral detail beyond annotations: it specifies the return dict with 'success', 'device_id', 'data' (or None on timeout), and 'message', and notes the default for max_bytes. This gives the agent useful expectations about timeouts and result structure, though it doesn't mention blocking behavior or partial reads.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a well-structured docstring with a one-line summary, a compact Args block, and a Returns block. Every sentence carries necessary information, and the format is front-loaded with the primary purpose before details. No fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple receive tool, this description is complete. It includes an implicit output schema via the Returns section, covering success and error message fields, the data field with a timeout condition (None), and the device_id echo. With annotations covering read safety, the agent has sufficient context to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema coverage is 0% per context, so the description must compensate for parameter meaning. It does: 'device_id (int): The unique identifier returned by usbtmc_connect()' clarifies the handle semantics, and 'max_bytes (int): Maximum bytes to read (default: 1024)' explains the read limit. This adds meaningful semantic value even though the nested schema also contains descriptions; the description makes the connection to the sibling tool explicit.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource statement: 'Receive data from a specific USBTMC device.' This clearly distinguishes it from siblings like usbtmc_send (send data), usbtmc_query (send-then-receive), and usbtmc_connect (establish connection). The title 'Receive Data from Device' further reinforces the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The first line establishes a clear use case (receiving data). The Args section notes that device_id is 'returned by usbtmc_connect()', implying a prerequisite connection. However, it does not explicitly state when NOT to use this tool or name alternatives (e.g., 'for query/response use usbtmc_query'), so it lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_screenshot_keysight_displayARead-only
Capture screenshot from a Keysight/Agilent oscilloscope.
Args: params (DeviceIdInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect()
Returns: Image
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the safety profile is known. The description adds the return type (Image) but lacks details on error behavior, prerequisites beyond device_id, or any side effects. It does not contradict annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with a one-sentence purpose statement followed by clearly labeled Args and Returns sections. Every line earns its place with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool, the description covers the essential aspects: what it does, which vendor it supports, the required parameter, and the return type. It does not cover error conditions or image format, but the low complexity and strong annotations make this acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite the 0% schema description coverage signal, the description explicitly documents device_id and its source (usbtmc_connect()), which compensates for the lack of schema-level descriptions. It provides clear meaning and provenance for the only parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (capture screenshot) and the resource (Keysight/Agilent oscilloscope), which distinguishes it from the Tektronix sibling tool. The vendor-specific naming removes ambiguity about which device family it applies to.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for Keysight/Agilent devices but does not explicitly mention when to use it versus the Tektronix sibling or provide exclusions. The context is present but not spelled out, leaving the agent to infer the alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_screenshot_tektronix_displayARead-only
Capture screenshot from a Tektronix oscilloscope.
Args: params (DeviceIdInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect()
Returns: Image
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark readOnlyHint=true and destructiveHint=false. The description adds the prerequisite that device_id comes from usbtmc_connect(), implying an active connection is needed. However, it does not explain capture behavior, potential failures, or format of the returned image.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a short, front-loaded purpose sentence followed by compact parameter and return notes. It avoids unnecessary prose, though the Args section duplicates schema info.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only capture tool with a single well-documented parameter and good annotations, the description covers the essential invocation details. It lacks explicit sibling differentiation and output format detail, but the name and annotations fill some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema fully describes device_id with type, range, and provenance ('returned by usbtmc_connect()'). The description repeats this information without adding new semantics, so it provides no value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Capture screenshot from a Tektronix oscilloscope', providing a specific verb, resource, and brand distinction from the Keysight sibling tool. This fully defines the tool's purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool versus the alternative usbtmc_screenshot_keysight_display. It does not mention device compatibility conditions or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_sendA
Send a SCPI command to a specific USBTMC device.
Use for SET commands (without '?') that configure device settings. For QUERY commands (with '?'), use usbtmc_query() instead.
This function only sends data; use usbtmc_receive() to read responses, or use usbtmc_query() for send+receive in one operation.
Args: params (SendInput): Input containing: - device_id (int): The unique identifier returned by usbtmc_connect() - command (str): SCPI command string to send
Returns: dict: Result containing: - success (bool): Whether the send was successful - device_id (int): The target device_id - command (str): The command that was sent - message (str): Success or error message
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that this function only sends data and does not read responses, and it outlines the return dict structure. It also notes the need for separate receive/query operations. This adds context beyond the annotations, though it does not discuss potential device-side effects or idempotency nuances. Minor inconsistency with schema examples querying commands, but overall transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with purpose, usage guidance, args, and returns. It is reasonably concise, though the usage guidance and send-only note are slightly repetitive. Every sentence earns its place, but the redundancy prevents a perfect score.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema, the description covers the essential aspects: what it does, when to use it, parameters, and return values. It does not mention error handling or edge cases, but the return message field addresses that. Overall, it is complete for practical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides detailed descriptions for device_id and command, including examples. The description's Args section repeats this information without adding new semantic meaning. It does helpfully frame the command as a SCPI string and device_id as a connection identifier, but this does not significantly exceed schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Send a SCPI command to a specific USBTMC device' with a specific verb and resource. It also distinguishes itself from siblings by explicitly directing query commands to usbtmc_query(), making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly tells the agent when to use this tool ('Use for SET commands (without '?')') and when to use alternatives (usbtmc_query() for queries, usbtmc_receive() for reading responses). This is model guidance with named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
usbtmc_unlock_keysight_devicesAIdempotent
Switch all Keysight devices from firmware update mode to USBTMC mode.
Some Keysight USB modular instruments (e.g., U2700 series) power on in firmware update mode and require a vendor-specific command to switch to normal USBTMC operation.
After calling this function, devices will re-enumerate on the USB bus. Wait a moment, then call usbtmc_list_devices() to discover them.
Returns: dict: Result containing: - unlocked_count (int): Number of successfully unlocked devices - total_found (int): Total devices found in firmware mode - message (str): Success or informational message - errors (list[str], optional): List of error messages if any device failed
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (readOnlyHint=false, idempotentHint=true, etc.), the description discloses a critical side effect: devices will re-enumerate on the USB bus and the agent must wait before listing them. It also indicates that the result includes an error list, but it does not discuss permissions or non-Keysight devices, though that is arguably beyond the scope given the empty schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and concise: one purpose sentence, a two-sentence background, a clear post-usage instruction, and a cleanly formatted return-value block. Every sentence earns its place without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that the tool takes no parameters and has a detailed output schema, the description is fully complete: it states the purpose, when to use it, the re-enumeration side effect, and the return structure. There are no missing pieces for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the input schema is empty, so the description correctly requires no input. Per the rule for 0-parameter tools, the baseline is 4. The description does not add parameter details because there are none to add.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with 'Switch all Keysight devices from firmware update mode to USBTMC mode,' a clear verb-object with scope. This directly distinguishes it from sibling tools like usbtmc_list_devices or usbtmc_connect by specifying the exact action and target device type.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the triggering condition (some Keysight devices power on in firmware update mode) and gives a concrete workflow: call this function, wait, then call usbtmc_list_devices. It does not explicitly say when not to use it, but the context implies it is only for devices in firmware mode, making usage sufficiently clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.1.0- First observed
usbtmc_clear - First observed
usbtmc_connect - First observed
usbtmc_disconnect - First observed
usbtmc_list_connected_devices - First observed
usbtmc_list_devices - First observed
usbtmc_query - First observed
usbtmc_receive - First observed
usbtmc_screenshot_keysight_display - First observed
usbtmc_screenshot_tektronix_display - First observed
usbtmc_send - First observed
usbtmc_unlock_keysight_devices
TDQS
Scored across 11 tools
Each tool targets a distinct operation: discovery, connection, communication, recovery, vendor unlock, and vendor-specific screenshots. The only potential confusion between list_devices and list_connected_devices is resolved by clear descriptions.
All tools follow a usbtmc_<verb>_<noun> pattern in lowercase snake_case, with consistent verb-first ordering and vendor qualifiers where needed.
11 tools is well-scoped for a USBTMC server, covering the full workflow without excessive fragmentation.
The tool set covers the complete lifecycle from discovery to disconnection, including send/receive/query for SCPI communication, recovery via clear, and vendor-specific features for Keysight and Tektronix.
Maintenance
Related MCP Connectors
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Documentation for the Spektralwerk spectrometer SCPI API as a streamable HTTP MCP Server
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
One connector URL giving any MCP client live access to 21 services and 51 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for controlling Hantek DSO2D15 and other DSO2000-family oscilloscopes via USB and SCPI, enabling waveform acquisition, measurements, and screen captures.MIT
- FlicenseNot gradedqualityCmaintenanceMCP server to remotely control Siglent SDM3000 series digital multimeters via TCP/IP SCPI protocol, enabling measurement, configuration, and data acquisition.-
- AlicenseBqualityBmaintenanceAn MCP server for controlling lab instruments (oscilloscopes, signal generators, etc.) via standardized interfaces like USBTMC, RS-232, and LAN.100MIT
- AlicenseNot gradedqualityDmaintenanceConnects test and measurement instruments (oscilloscope, logic analyzer, multimeter, power supply) to AI via MCP, enabling natural language control and automated analysis.MIT