Skip to main content
Glama
NaoNaoMe

USBTMC MCP Server

by NaoNaoMe

usbtmc_receive

Read-only

Read data from a connected USBTMC test instrument via its device ID, with configurable byte limit. Retrieve measurement results directly from your device.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

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/NaoNaoMe/usbtmc-lite-mcp'

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