Skip to main content
Glama

Get widget tree

get_widget_tree
Read-onlyIdempotent

Inspect a running Flutter app's widget tree to understand UI structure, find specific widgets, or see what is currently mounted.

Instructions

Snapshot of the running app's widget tree (summary tree from the Flutter Inspector). Use to understand structure, find a widget, or see what is mounted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoHow deep to traverse before truncating.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds that this is a 'summary' tree of a 'running app'—implying an attached session and truncated detail—but does not say what is omitted, whether it requires a live connection, or how large trees are handled. Useful but modest added context.

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?

Two short sentences, front-loaded with what the tool returns, followed by when to reach for it. No filler or redundancy.

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?

No output schema exists, so the description carries the return-value burden; 'summary tree from the Flutter Inspector' does convey the shape and the summary/truncated nature. It could say more about output scale or the need for a live app session, but it is adequate for a simple read-only diagnostic.

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?

Only one parameter (maxDepth) and schema description coverage is 100%, with a clear default and maximum already documented. The description adds no traversal or truncation semantics beyond the schema, so the baseline of 3 applies.

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+resource (snapshot of the running app's widget tree) and names the source (Flutter Inspector summary tree). An agent can distinguish it from get_selected_widget, though the description does not explicitly contrast with that sibling.

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?

Gives implied usage contexts ('understand structure, find a widget, or see what is mounted'), which is genuine guidance, but names no alternative and gives no when-not conditions (e.g., when to prefer get_selected_widget or get_rebuilds).

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