Skip to main content
Glama

Brapi Walk Pedigree

brapi_walk_pedigree
Read-only

Walk germplasm ancestry or descendancy as a deduplicated DAG, with multi-generation traversal, cycle detection, and depth limits. Returns nodes + edges plus traversal stats (depthReached, rootCount, leafCount, cycleCount, deadEndCount).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoConnection alias registered via brapi_connect. Omit to read the connection registered under alias `default` — i.e. a prior brapi_connect call that did not specify an alias. Calls that used a non-default alias must pass that same alias here.
maxDepthNoMax generations to walk per direction (default 3, cap 10).
directionNoWhich direction to walk: ancestors (parents), descendants (progeny), or both.ancestors
loadLimitNoCap on rows returned inline. Omit for the deployment default. Rows beyond the cap land in a dataframe; query with brapi_dataframe_query (SQL) instead of paging row-by-row.
germplasmDbIdsYesStarting germplasm (1–20 roots). All roots are walked concurrently.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoAlias of the registered BrAPI connection the call used.
edgesNoDeduplicated edge list. `relationship: "parent"` means `from` is a parent of `to`; `relationship: "child"` means `from` is a descendant of `to`.
errorNoPresent when the call failed. Absent on success.
nodesNoDeduplicated node list — every germplasm reached by the walk, sorted by depth then DbId.
maxDepthNoThe maximum depth the walk was allowed to reach (echoed from the input).
warningsNoAdvisory messages (capability gaps, per-node expansion failures).
directionNoThe direction the walk expanded (echoed from the input).
leafCountNoNodes that have no outgoing edges in the walked direction — terminal in the DAG.
rootCountNoNumber of starting germplasm roots.
truncatedNoTrue when the walk hit the 1000-node safety cap before exhausting depth.
cycleCountNoNumber of times the walk revisited an already-registered node (cycles broken).
deadEndCountNoNodes whose upstream pedigree/progeny lookup failed.
depthReachedNoDeepest BFS level that produced at least one new edge (0 if only roots were walked).
edgesDataframeNoCanvas dataframe holding the full edge set, present when the walk exceeds loadLimit — edges[] is then a bounded preview. Any edge field that is a reserved SQL word (e.g. `from` → `from_`) is renamed to a SQL-safe identifier; columnLegend maps it back. Query with brapi_dataframe_query (SQL).
nodesDataframeNoCanvas dataframe holding the full node set, present when the walk exceeds loadLimit — nodes[] is then a bounded preview. Query with brapi_dataframe_query (SQL); JOIN to the edges dataframe on germplasmDbId.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering safety. The description adds substantial behavioral context: results are deduplicated, cycles are detected, traversal is depth-limited, and stats include depthReached, rootCount, leafCount, cycleCount, and deadEndCount. It does not contradict the 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 one tight, front-loaded sentence that leads with the core operation and then lists the key output artifacts and stats. No filler, repetition, or unnecessary detail.

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

Completeness4/5

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

Given the output schema, annotations, and 100% parameter coverage, the description plus schema provides enough for correct invocation: roots, direction, depth, load cap, and alias are all accounted for. The only notable omission is explicit guidance about when to prefer this tool over sibling germplasm tools, but that is a usage nuance rather than a completeness blocker.

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 100%, and each parameter already has a rich description including defaults, enums, caps, and alias behavior. The main description adds useful conceptual context for the traversal parameters but does not need to compensate for schema gaps.

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 states a specific verb ('Walk'), a specific resource ('germplasm ancestry or descendancy'), and a distinctive mode ('deduplicated DAG'). It clearly sets this apart from sibling find/get tools even without naming them explicitly.

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 description implies when to use the tool (whenever pedigree traversal is needed), but it does not explicitly state when not to use it or which sibling to prefer. The only alternative guidance appears in the loadLimit parameter description, which routes overflow rows to brapi_dataframe_query.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.