Skip to main content
Glama

device_ble_heal

Idempotent

Resets a non-finite BluetoothDevice.connectionCount to 0 on live devices so reconnect logic works without power-cycling; run when device_ble_state reports connectionCountOk=false.

Instructions

Reset a non-finite (NaN/undefined) BluetoothDevice.connectionCount to 0 on live devices — the state markBluetoothDevice would have set — so the app's reconnect logic works again without power-cycling the board. No BLE I/O. Run before upgrades/pairing when device_ble_state shows connectionCountOk=false.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent, non-destructive, so the description's marginal value is in explaining that only the in-memory connectionCount is rewritten ('on live devices', 'the state markBluetoothDevice would have set') and that no BLE traffic occurs — useful disclosure beyond the structured fields. It stops short of saying whether the reset survives a reboot or what the call returns on success/failure, which matters for a mutating tool with no output schema.

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?

Two sentences, front-loaded with the mutation, followed by the precondition — no filler. Dense internal jargon ('markBluetoothDevice', 'connectionCountOk') is justified since it maps to sibling tool fields, though it slightly narrows readability.

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?

For a zero-param, no-output-schema repair tool the description covers what changes, why it helps, and when to invoke it. The only gap is the absence of any hint about the call's result/confirmation, which an agent might want before deciding to re-run.

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 tool takes zero parameters and the schema is fully covered, so the baseline applies. The description correctly implies no arguments are needed by framing the fix as a targeted state repair rather than a configurable operation.

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?

States a specific verb+resource ('Reset ... BluetoothDevice.connectionCount to 0') with the precise condition being fixed (non-finite NaN/undefined) and the exact effect. It also distinguishes itself from siblings by referencing device_ble_state as the diagnostic counterpart, so an agent can place it in the toolset without opening other schemas.

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?

Gives an explicit trigger ('Run before upgrades/pairing when device_ble_state shows connectionCountOk=false') and an explicit exclusion ('No BLE I/O'), which routes the agent away from connect_bluetooth/connect_serial. Nothing is left to inference.

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