Brapi Find Variables
brapi_find_variablesFind observation variables (traits) by name, trait class, ontology term, or free-text query. Free-text queries are ranked against the returned set and may resolve to ontology URIs when the server advertises them. When the upstream total exceeds loadLimit, the full result set is materialized as a dataframe — query it with brapi_dataframe_query (SQL).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | Filter by common crop name (single value). | |
| text | No | Free-text query. Ranks the **full upstream union** (the spilled dataframe when one is produced, otherwise the first page) via the ontology resolver, then fills the in-context window up to loadLimit with matches first and unmatched rows for context. Use exact filters (`variables`, `variableNames`, `variablePUIs`, `traitClasses`, `ontologies`) to actually narrow the upstream pull. Differs from `brapi_find_germplasm.text`, which drops unmatched rows. | |
| alias | No | Connection 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. | |
| scales | No | Filter by scaleDbIds. | |
| methods | No | Filter by methodDbIds. | |
| studies | No | Filter by studyDbIds. | |
| loadLimit | No | Cap 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. | |
| variables | No | Filter by observationVariableDbIds. | |
| ontologies | No | Filter by ontologyDbIds. | |
| extraFilters | No | Extra BrAPI filters forwarded verbatim. Valid keys vary by endpoint; brapi_describe_filters enumerates them. Named params on this tool take precedence on conflict. | |
| traitClasses | No | Filter by trait class. | |
| variablePUIs | No | Filter by persistent ontology URIs. | |
| variableNames | No | Filter by exact observationVariableNames. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | Alias of the registered BrAPI connection the call used. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no rows were returned — how to broaden filters or retry. | |
| hasMore | No | True when more rows exist beyond the returned set. | |
| results | No | Observation variable rows returned in-context (up to loadLimit). Rows matching `text` are promoted to the top when the free-text query produces candidates. | |
| warnings | No | Advisory messages (filter overrides, partial data, capability gaps). | |
| dataframe | No | Dataframe handle when the full result set was materialized as a dataframe. Query it with brapi_dataframe_query (SQL). | |
| totalCount | No | Total rows reported by the server. | |
| distributions | No | Value frequency per field across the full result set. | |
| returnedCount | No | Length of results[]. | |
| appliedFilters | No | The final filter map sent to the server (named + extraFilters). | |
| refinementHint | No | Suggested next-step query refinement when the result set is large. | |
| ontologyCandidates | No | Top ranked candidates from the free-text query (if any). Empty when `text` was not supplied. |