Skip to main content
Glama

read_branches

Read-onlyIdempotent

Read selected branches from a ROOT TTree or RNTuple with optional cut expressions and row bounds to extract data without modifying the file.

Instructions

Read selected branches from a ROOT TTree or RNTuple, optionally with a cut expression. Set entry_start/entry_stop to bound rows; prefer get_branch_stats or histograms for large datasets. Does not modify files.

Input Schema

NameRequiredDescriptionDefault
pathYesFile path
limitNoMaximum rows to return (alternative to entry_stop)
offsetNoRows to skip (alternative to entry_start)
definesNoDerived branch names mapped to expressions
flattenNoFlatten jagged arrays; loses event boundaries
branchesYes
selectionNoOptional cut expression
tree_nameYesTree name
entry_stopNoExclusive stop entry
entry_startNoStart entry

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.3.1
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / branches / minItems
      Added value: +1
    • addedInput schema / properties / defines
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Derived branch names mapped to expressions",
      +  "type": "object"
      +}
    • addedInput schema / properties / entry_start / minimum
      Added value: +0
    • changedInput schema / properties / entry_stop / description
      Previous value: -"Stop entry"New value: +"Exclusive stop entry"
    • addedInput schema / properties / entry_stop / minimum
      Added value: +1
    • addedInput schema / properties / flatten
      Added value: +{
      +  "description": "Flatten jagged arrays; loses event boundaries",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum rows to return (alternative to entry_stop)",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Rows to skip (alternative to entry_start)",
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. First observedv0.1.7

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, so 'Does not modify files' mainly restates them. The description usefully flags a performance consideration for large datasets and the optional cut expression, but says nothing about return shape or memory behavior for wide branch selections.

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?

Three short sentences with no waste: purpose first, then row-bounding, then the large-dataset alternative, then the safety note. Every sentence carries distinct information.

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?

With 10 parameters, nested objects (defines), and no output schema, the description covers invocation adequately but leaves the returned data structure unexplained. An agent cannot predict the shape of results, only how to bound them.

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 description coverage is 90%, so parameters are already well documented. The description reinforces entry_start/entry_stop and the cut expression but adds no clarification on the limit/offset vs. entry_start/entry_stop relationship or on defines/flatten, so it stays at the baseline.

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 and resource ('Read selected branches from a ROOT TTree or RNTuple') and names an alternative (get_branch_stats) for one case. It is not fully differentiated from siblings like export_data or list_branches, but the core operation is unambiguous.

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?

Gives concrete when-to-use guidance: bound rows with entry_start/entry_stop, and prefer get_branch_stats or histograms for large datasets. It omits when to choose this over export_data or list_branches, so alternatives are only partially covered.

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