Skip to main content
Glama
hardware-tooling-mcp
by Pheem49

ble_read_write_characteristic

Read or write a BLE GATT characteristic on a peripheral by address and UUID, with optional payload encoding, response mode, and read-back verification.

Instructions

Read from and/or write to a GATT Characteristic on a BLE peripheral.

Args: address: BLE MAC address or UUID of the target board/sensor. characteristic_uuid: UUID of the GATT characteristic to read/write. write_data: Optional payload to write. If None, performs a read-only operation. encoding: 'utf-8', 'ascii', or 'hex' (e.g. '01 FF 0A') when writing data. read_after_write: Whether to read the characteristic value back after writing. with_response: Request GATT write-with-response (True) or write-without-response (False). timeout_sec: Connection timeout in seconds (default 10.0).

Input Schema

NameRequiredDescriptionDefault
addressYes
encodingNoutf-8
write_dataNo
timeout_secNo
with_responseNo
read_after_writeNo
characteristic_uuidYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does meaningful work: it explains write-with-response vs write-without-response, read-back-after-write behavior, and the read-only mode when write_data is None. It omits failure modes, permission/pairing requirements, and whether a write is persistent or reversible on the peripheral, which matter for a mutating operation.

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

Conciseness4/5

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

The purpose sentence is front-loaded and the per-argument list is compact with no filler. The structure is scannable, though the 'Args:' block format is slightly verbose relative to what a one-line-per-param summary would need.

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?

An output schema exists, so return-value explanation is correctly omitted, and the description covers mode selection, encoding, and timing for a seven-parameter tool. What remains missing is operational context for a write-capable BLE tool: error behavior, characteristic-writability requirements, and connection lifecycle expectations.

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?

Schema description coverage is 0%, so the description must compensate, and it documents all seven parameters with meaning beyond bare titles: address accepts a MAC or UUID, encoding lists accepted values and a hex example ('01 FF 0A'), and the boolean flags are explained semantically rather than restated. Minor gap: no indication of whether characteristic_uuid accepts short-form handles or only full 128-bit UUIDs.

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

Purpose4/5

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

States a specific verb pair and resource: 'Read from and/or write to a GATT Characteristic on a BLE peripheral.' An agent can distinguish this from ble_scan_devices and ble_inspect_gatt by the read/write action. It stops short of naming those siblings or explicitly excluding inspection/discovery use.

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?

Usage is implied by the write_data semantics ('If None, performs a read-only operation'), which effectively describes two modes of invocation. However, there is no explicit when-to-use guidance, no mention of prerequisites (pairing, characteristic writability), and no routing to ble_inspect_gatt when the characteristic UUID is unknown.

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