Skip to main content
Glama

Where Used

where_used
Read-only

Find every parent component that consumes a given item by traversing the lockfile dependency graph. Use it to assess the blast radius before changing an item, so you know exactly which components must be rebuilt or re-dispatched.

Instructions

Where-used / impact analysis (issue #142, C3; MULTI_AGENT.md §9): traverse the lockfile depends_on graph and report every parent that CONSUMES an item — the blast radius, so exactly those parents re-dispatch when the item changes. The lockfile records edges consumer -> consumed (lid depends_on housing); where-used is the reverse reachability of the item (everything that reaches it).

lockfile: path to the lockfile (the JSON assembly_lock wrote). item: the item / component id to query. direct: if true, also surface only the immediate mates separately.

Returns {item, where_used (the full transitive blast radius), direct (the §9 immediate-neighbour layer)} — an unknown item fails loudly, never a silent empty set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYes
directNo
lockfileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses the return contract ({item, where_used, direct}), the transitive-vs-immediate distinction, and the loud-failure behavior for unknown items: 'fails loudly, never a silent empty set.' It also explains exactly what 'where used' means in terms of graph reachability. No contradiction with annotations.

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?

The description is dense but every sentence carries operational content: purpose, graph convention, per-parameter semantics, and return/error behavior. Reference tags like issue #142 are minor noise, but the core explanation is front-loaded and well structured.

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?

For a non-trivial graph traversal with no output schema and sparse input schema, the description supplies all needed calling context: what the lockfile is, what item means, what direct controls, what the result shape is, and how failures behave. An agent can select and invoke this tool correctly without additional lookup.

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

Parameters5/5

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

Schema description coverage is 0%, but the description manually documents all three parameters: lockfile (the JSON assembly_lock wrote), item (component id to query), and direct (whether to surface immediate mates separately). This fully compensates for the bare schema and ties each parameter to the traversal semantics.

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?

The description names a specific operation—traversing the lockfile depends_on graph to find every consuming parent—and frames it as reverse reachability and blast radius. The graph-orientation examples make the resource and direction unambiguous, distinguishing it from forward-dependency or general impact tools.

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

Usage Guidelines4/5

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

It gives clear when-to-use context: this is for impact/blast-radius analysis before re-dispatch, and it explains that the lockfile stores consumer->consumed edges while this tool computes the reverse. It does not explicitly name alternatives or state when not to use it, so it stops short of full routing guidance.

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

Deploy Server

Other Tools