Skip to main content
Glama

Wait for Device to Become Reachable

cnc_wait_for_device_reachable
Read-onlyIdempotent

Wait for a device to become reachable by polling its reachability state until it converges, replacing manual loops after creation or credential fixes.

Instructions

Poll a device until its reachability_state is CONN_STATE_REACHABLE.

Read-only convergence wait. Call it right after cnc_create_device (or after fixing credentials / admin state) instead of polling cnc_get_device in a loop. Pass exactly one of uuid / host_name. A new device typically moves UNKNOWN/CHECKING -> REACHABLE within a minute or two once it is attached to a Data Gateway.

Returns: str: On success: "Device () is reachable after Ns." plus a JSON summary (reachability_state, operational_state, dg_name, errors). On timeout (NOT an error): "Not reachable yet after Ns; current reachability_state=..., operational_state=..." plus the same summary — call again to keep waiting, or inspect 'errors' / dg_name. "Error: ..." only for API failures or when no device matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidNoDevice uuid (from cnc_create_device's impacted_objects).
host_nameNoDevice host name, exact match (e.g. 'PE1').
timeout_secondsNoHow long to wait in total (e.g. 180).
interval_secondsNoSeconds between polls (e.g. 10).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds critical behavior beyond them: a timeout is explicitly NOT an error and the caller should re-invoke, the typical UNKNOWN/CHECKING -> REACHABLE timeline, and the shape of both success and timeout responses. This is exactly the kind of convergence-wait context an agent needs.

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?

Front-loads the core action, then usage, then return semantics in a logical order. Slightly long, and the Returns block partially restates the output schema, but every line (notably timeout-is-not-an-error) carries information. Minor redundancy is the only deduction.

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?

With an output schema and full annotation coverage present, the description still supplies the missing semantic layer: mutual-exclusive selector params, timeout semantics, and expected device-state transitions. Nothing an agent needs to invoke and interpret the result is absent.

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 coverage is 100%, so baseline is 3, but the description adds a real constraint the schema cannot express: pass exactly one of uuid / host_name. It also ties uuid back to cnc_create_device's impacted_objects. The timeout/interval parameters are left to the schema, which is adequate.

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 action and target: 'Poll a device until its reachability_state is CONN_STATE_REACHABLE.' It names the exact terminal state and, via the usage line, distinguishes itself from plain polling with cnc_get_device. An agent can select it without opening any schema.

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 explicit when-to-use ('right after cnc_create_device', 'after fixing credentials / admin state') and names the alternative it replaces ('instead of polling cnc_get_device in a loop'). It also states the mutual-exclusion rule ('Pass exactly one of uuid / host_name').

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