Skip to main content
Glama

query_text

Send an ASCII command to a serial device and capture the response until a prompt or idle, combining clear, send, and read into one step.

Instructions

Convenience: clear the buffer, send an ASCII command, and read the reply.

For the common "ask the device something and read its answer" case. Reads until prompt (or the connection's prompt) appears; with no prompt anywhere, or prompt="", reads until the device goes idle for a short beat (best for line-based rigs/CAT that reply with a terminated string and no shell prompt).

Args: data: Command text, e.g. "show version" or "ID". line_ending: "CR", "CRLF", "LF", or "NONE" (see send_text). Default: the connection's line ending. prompt: Literal prompt to read until, e.g. "# " or ";". "" forces an idle-terminated read even if the connection has a prompt. read_timeout: How long to wait overall, in seconds. connection: Which open connection (name). Default: the current one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
promptNo
connectionNo
line_endingNo
read_timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.3.2
    • addedInput schema / properties / connection
      Added value: +{
      +  "default": "",
      +  "title": "Connection",
      +  "type": "string"
      +}
    • addedInput schema / properties / line_ending / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "CR",
      +      "CRLF",
      +      "LF",
      +      "NONE"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / line_ending / default
      Previous value: -"CR"New value: +null
    • removedInput schema / properties / line_ending / enum
      Removed value: -[
      -  "CR",
      -  "CRLF",
      -  "LF",
      -  "NONE"
      -]
    • removedInput schema / properties / line_ending / type
      Removed value: -"string"
    • addedInput schema / properties / prompt / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / prompt / default
      Previous value: -""New value: +null
    • removedInput schema / properties / prompt / type
      Removed value: -"string"
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the buffer is cleared first, that reads continue until a prompt or idle period, and the special behavior when prompt is empty or no prompt exists. It does not describe timeout/error behavior, but the output schema likely covers the result.

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 front-loaded with a one-line summary, then a concise use-case paragraph, then a tight Args list. Every sentence adds operational detail and no filler is present.

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?

Given five parameters and a convenience composition, the description explains the workflow, parameter semantics, and edge cases thoroughly. It leaves timeout behavior and return formatting to the output schema, which is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the Args section documents every parameter with type, defaults, examples, and special values (e.g., prompt='' forces idle-terminated read). It even clarifies line_ending choices and connection default, fully compensating for the schema's bare titles.

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?

Description opens with a precise three-step verb sequence—clear buffer, send ASCII command, and read reply—and names itself a convenience wrapper. This clearly separates it from siblings like send_text, clear_buffer, and read_until_prompt, which each handle only part of the workflow.

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 explicitly scopes the tool to the common 'ask the device something and read its answer' case and explains when idle-terminated reading is best. It does not enumerate exclusions or name alternative tools for non-convenience cases, though the 'see send_text' reference hints at related primitives.

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