Skip to content
Agent Tools

dependents

Trace downstream dependents — the cells that read from a given cell, transitively. Default mode ‘grouped’: cells sharing a formula pattern are collapsed into labeled chunks, labeled from nearby headers. This provides a token-efficient structural view that shows how values flow from parameters through intermediate calculations to outputs.

Switch to mode: “cells” to drill into individual cells: each node carries the formula, value, and error of the dependent cell so you can see exactly how a value propagates through the sheet. When a formula uses a range, Apiary resolves range containment internally; the dependent formula appears as a direct child of the queried cell rather than via an intermediate range node.

“grouped” response shape — each node carries:

  • type: “output” (computed, no dependents), “inter” (computed, has dependents), “data” (value range), “param” (single value cell)
  • labels: human-readable names derived from nearby headers
  • formula: the formula pattern for this chunk (with relative references)
  • rootHeight: dependency distance from graph roots (parameters/data)
  • leafDepth: dependency distance from graph leaves (outputs)
  • dependents: dict of downstream chunk nodes keyed by their ref (omitted for terminal outputs)
  • alreadyVisited: true when this chunk was expanded elsewhere in the tree (diamond/cycle cut)
  • truncated: present when traversal stopped early; reason is “maxDepth” or “maxNodes”; totalChildren reports the real count when children were cut short

“cells” response shape — each node carries:

  • kind: “cell” or “name”
  • formula: the formula string, or null for value cells
  • value: the calculated value
  • errorValue: present only when the cell evaluates to a formula error
  • dependents: a dict of child nodes keyed by their own ref (omitted for leaves with no downstream consumers)
  • alreadyVisited: true when this node has been fully expanded elsewhere in the tree (diamond/cycle cut)
  • truncated: present when traversal stopped early; reason is “maxDepth” or “maxNodes”; totalChildren reports the real count when children were cut short

Both modes use maxDepth (default 10, max 50) to bound recursion and maxNodes (default 100, max 500) as a global budget on the returned tree.

ParameterTypeDescription
referencestringrequiredCell reference to trace (e.g. ‘C1’, ‘Sheet2!A1’)
mode"cells" | "grouped"optionalOutput mode: ‘grouped’ (default) shows chunks of cells sharing a formula pattern, labeled from nearby headers — token-efficient for structure. ‘cells’ drills into individual cells. (default: "grouped")
maxDepthintegeroptionalMaximum recursion depth through formula cells (default 10). Range expansion does not consume depth.
maxNodesintegeroptionalTotal node budget for the returned tree (default 100). When the budget is exhausted, the node whose children were cut is marked truncated with totalChildren; re-query a specific cell to drill deeper.