Skip to main content
Glama

get_hierarchy

Read-onlyIdempotent

Browse the instance tree below a given path to list structural children (submodules and leaf primitives). Excludes assign glue, reported as assign_count.

Instructions

Browse the instance tree below path (or the top instance). Use this for structural children; use find for design-wide name search or get_stats for aggregate model counts. Lists only non-assign children (real submodules + leaf primitives); assign glue is reported as assign_count, not enumerated. Each child carries a leaf flag (submodule vs leaf primitive). depth<=5; the non-assign set is paginated at the root via limit/cursor (next_cursor/has_more), deeper levels via children_truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoHierarchical instance path; omit to start at the top instance.
depthNoTree depth from 1 through 5; out-of-range values are clamped.
limitNoMaximum non-assign children per level; root default 20, maximum 100.
cursorNoOpaque root-level next_cursor from a previous response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.9
    • addedInput schema / properties / cursor / description
      Added value: +"Opaque root-level next_cursor from a previous response."
    • addedInput schema / properties / depth / description
      Added value: +"Tree depth from 1 through 5; out-of-range values are clamped."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum non-assign children per level; root default 20, maximum 100."
    • addedInput schema / properties / path / description
      Added value: +"Hierarchical instance path; omit to start at the top instance."
  2. First observedv0.1.8

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish a safe read (readOnlyHint=true, idempotentHint=true, destructiveHint=false), and the description goes well beyond them: it discloses that only non-assign children are listed, that `assign` glue is summarized as `assign_count`, that each child carries a `leaf` flag, that depth is capped at 5, and that root pagination uses limit/cursor with next_cursor/has_more while deeper levels report children_truncated. This is exactly the kind of result-shaping behavior an agent needs.

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?

Front-loaded with the core action, and nearly every clause carries distinct information (sibling routing, assign handling, leaf flag, depth cap, pagination). It is dense and somewhat run-on, but there is essentially no filler to cut.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the full burden of describing return shape — and it does, covering assign_count, the per-child leaf flag, next_cursor/has_more, and children_truncated. Combined with the sibling routing and depth limits, an agent has everything needed to call and interpret this tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the schema already documents path, depth, limit, and cursor. The description adds genuine meaning the schema lacks: that depth is capped at 5, that pagination applies only at the root while deeper levels truncate, and that the cursor is a root-level opaque token. It does not add syntax/format detail for `path`, so it stops short of 5.

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?

States a specific verb and resource ('Browse the instance tree below `path`') and immediately scopes it against siblings ('use find for design-wide name search or get_stats for aggregate model counts'). An agent can distinguish it from find/get_stats/get_module_card without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names two alternative tools and the exact condition that selects each (design-wide name search vs aggregate counts vs structural children). It also clarifies the fallback behavior for `assign` children and where pagination applies, leaving little to inference.

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