Skip to main content
Glama

qt_get_text

Extract text from Qt editors, line edits, labels, and combo boxes via a widget reference to read field values and displayed content.

Instructions

Extract text content from a text editor or input widget.

Args: ref: Widget ref from qt_snapshot (e.g., 'w5').

Works with QPlainTextEdit, QTextEdit, QLineEdit, QLabel, QComboBox, and any widget with a text() or toPlainText() method.

Input Schema

NameRequiredDescriptionDefault
refYes
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. 'Extract' signals a non-mutating read, and the widget-coverage sentence is genuinely useful behavior context, but it says nothing about what happens for unsupported widgets (error vs empty string) or about focus/visibility requirements.

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?

Short, front-loaded, and the Args block plus compatibility sentence are each doing distinct work. The 'any widget with a text() or toPlainText() method' clause is slightly redundant with the enumerated list but still informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 values need not be explained, and the ref origin is covered. However, an undocumented second parameter and no failure-mode guidance leave gaps for a tool that agents will call on arbitrary widgets.

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

Parameters3/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. It does well for 'ref' — origin (qt_snapshot) and format example ('w5') — but the second parameter, 'instance', is never mentioned anywhere, leaving it fully undocumented.

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 and resource ('Extract text content from a text editor or input widget') and lists the concrete widget types it covers, which is well beyond a tautology. It does not differentiate itself from nearby siblings like qt_widget_details, which could plausibly also surface text.

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 only implied: the 'ref' note tells the agent to call qt_snapshot first, which establishes a workflow order. There is no explicit when-to-use versus qt_widget_details or when-not (e.g., non-text widgets), so the agent must infer routing.

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