Skip to main content
Glama

qt_thread_check

Detect Qt threading issues by checking QObject thread affinity, flagging QWidget subclasses on non-GUI threads, and listing QThread instances to prevent GUI freezes.

Instructions

Check thread affinity of all QObjects to detect threading issues.

Reports which threads own QObjects, flags QWidget subclasses on non-GUI threads (the #1 cause of GUI freezes), and lists QThread instances.

Input Schema

NameRequiredDescriptionDefault
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry the whole behavioral burden. It does disclose meaningful substance — which threads own QObjects, which widgets are on non-GUI threads, and a listing of QThread instances — implying a read-only diagnostic. However, it never states that it is non-mutating, how expensive it is, or what the scoping effect of the 'instance' parameter is.

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?

Three short sentences, front-loaded with the verb and resource, with the parenthetical 'the #1 cause of GUI freezes' earning its place by justifying the tool's existence. No filler, though it is slightly padded by the itemized listing.

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-value explanation is not required, and the description adequately frames the diagnostic output. But with no annotations and an undocumented parameter, key details — safety profile, instance scoping, behavior when no Qt app is present — are left uncovered.

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

Parameters2/5

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

The single `instance` parameter has 0% schema description coverage, so the description must compensate and does not — the parameter is never mentioned. Worse, the description says it checks 'all QObjects', which leaves ambiguous what passing an instance would narrow it to.

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 names a specific verb ('Check') and resource ('thread affinity of all QObjects') and states the goal ('detect threading issues'). It is clearly distinct from siblings like qt_layout_check or qt_object_tree, though it never explicitly names an alternative, so it falls short of a 5.

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?

The phrase 'to detect threading issues' and the note about GUI freezes imply a diagnostic use case, but there is no explicit when-to-use, when-not-to-use, or named alternative among the many qt_* siblings. The usage context is inferable rather than stated.

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