Skip to main content
Glama

relay_detect

Read-onlyIdempotent

Find which devices are connected to the user's machine through a relay: sends the MIDI Identity Request (F0 7E 7F 06 01 F7, changes nothing on the device) to every output and matches the answers — manufacturer, model, firmware version — against the drivers' identity blocks. With maker_requests, also sends the makers' own identity requests the drivers name (they change nothing either, but the relay asks the user to accept them, once per output: tell the user first), which recognise devices that ignore the universal one. Returns the best driver ids (recognised_by and firmware when an identity block recognised the device) and identity_hex to pass to report_result. A device that does not answer is found by its knobs with listen_ms (by_controls), or by what people confirmed of its port name (learned); when several remain, ask names the control to have the user turn next (expect: what each candidate would send), then call again with listen_ms.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "relay_detect"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe pairing code the relay page or program shows (e.g. 'K7QM-2XPA').
user_idNoYour anonymous SynthHub id, if you kept it from an earlier session (see the server instructions). Optional.
listen_msNoListen this long for a device that does not answer: ask the user first to turn three or four of its knobs during that time; the controls they send are matched against every driver (by_controls). Confirm the device with the user, then send its fingerprint to POST /v1/fingerprints so the next detection knows it.
timeout_msNoHow long to wait for answers (default 1000).
maker_requestsNoAlso send the makers' identity requests, after the user accepts them at the relay (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / listen_ms
      Added value: +{
      +  "description": "Listen this long for a device that does not answer: ask the user first to turn three or four of its knobs during that time; the controls they send are matched against every driver (by_controls). Confirm the device with the user, then send its fingerprint to POST /v1/fingerprints so the next detection knows it.",
      +  "maximum": 20000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / maker_requests
      Added value: +{
      +  "description": "Also send the makers' identity requests, after the user accepts them at the relay (default false).",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / user_id / description
      Previous value: -"Your anonymous osc-bridge id, if you kept it from an earlier session (see the server instructions). Optional."New value: +"Your anonymous SynthHub id, if you kept it from an earlier session (see the server instructions). Optional."
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

The description adds meaningful behavior beyond the readOnly/idempotent/openWorld annotations: the identity request changes nothing on the device, maker requests require user acceptance once per output, and the tool returns driver ids plus identity_hex for report_result. It is consistent with the annotations and discloses the main interaction constraints, though it omits error and relay-availability behavior.

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 and user-interaction constraints are front-loaded, and most clauses carry useful information. The description is a dense single paragraph with several parenthetical and semicolon-linked clauses, so it is informative but not maximally concise or easy to scan.

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?

With no output schema, the description adequately explains the returns: best driver ids, recognised_by/firmware when identity matched, and identity_hex for report_result. It also covers the non-answering-device path and multi-candidate path, though it does not describe failure cases such as invalid pairing codes or unreachable relays.

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 the schema already documents all five parameters. The description still adds workflow meaning for maker_requests and listen_ms, including the drivers' own identity requests, consent handling, by_controls/learned fallback matching, and repeat calls after asking the user to turn a control.

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?

The description states a specific verb and resource: find devices connected through a relay, send MIDI identity requests, and match responses against driver identity blocks. It is distinguishable in substance from adjacent relay tools, but it never explicitly contrasts itself with siblings such as relay_listen or relay_send.

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?

It gives clear conditional usage: use maker_requests only after telling the user, use listen_ms when a device does not answer, and call again after asking the user to turn a named control. It does not explicitly say when to choose this tool over relay_listen, relay_send, or relay_status.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.