Skip to main content
Glama

get_tree

Read a compact scene tree before editing to inspect element IDs, types, properties, and sizes for a screen or node.

Instructions

Read a compact scene tree before editing. Lines are <id> <type> [prop=value, ...] w=<size> h=<size>; * means annotated. Example: {"screen":"checkout","depth":3}.

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": {
      "screen": "<screen>"
    },
    "name": "get_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
nodeNoLowercase identifier matching [a-z][a-z0-9_]{0,31}
depthNo
screenYesLowercase identifier matching [a-z][a-z0-9_]{0,31}

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, and it does useful work by documenting the output line grammar (`<id> <type> [prop=value, ...] w=<size> h=<size>`) and the `*` annotated marker. It omits read-only confirmation, truncation/size limits for large trees, and behavior when `node` is absent or unknown.

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?

Two tight sentences plus a compact example, with the action and the output format front-loaded. The example earns its place by disambiguating how `screen` and `depth` combine, though the line-grammar sentence is dense enough to slow a first read.

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?

No output schema exists, so the description must describe returns — and it does so well with the line format. It still leaves gaps an agent would want for a tree-read tool: output size/truncation behavior, error cases, and what `node` scopes to.

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 coverage is 67%, and the two described params only repeat their regex pattern. The description adds meaning for `depth` implicitly via the example (`depth:3`) and for `screen` as the root scope, but `node` — which has no schema description — is never explained in the description either.

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?

"Read a compact scene tree before editing" gives a specific verb (read) and resource (scene tree) plus a temporal use cue. It does not name or distinguish itself from siblings such as diff, lint, links, or render, which also expose scene structure, so it stops 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 "before editing" implies the intended moment of use (pre-mutation inspection), which is genuine guidance. However, it never says when to prefer diff/lint/render instead, nor when this tool is inappropriate.

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