Skip to main content
Glama

Brapi Find Locations

brapi_find_locations
Read-only

Find research stations / field sites by country, abbreviation, type, location ID, or free-text. Countries filter by ISO 3166-1 alpha-3 code via countryCodes, or by free-form English country name via countryNames (resolved client-side to alpha-3 — "Uganda" → "UGA"). Optional bbox parameter restricts rows to a latitude/longitude window. When the spec-correct GeoJSON [lon, lat, alt] reading produces zero matches and at least one row carries a Point geometry, the bbox filter retries once with axes swapped (handles non-conformant servers that store [lat, lon, alt]) and surfaces a warning + coordinateAxisOrder: "swapped". When the upstream total exceeds loadLimit, the full result set is materialized as a dataframe — query it with brapi_dataframe_query (SQL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNoOptional post-fetch bounding box. All four corners must be set to activate the filter.
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.
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.
locationsNoFilter by locationDbIds.
countryCodesNoISO 3166-1 alpha-3 country codes.
countryNamesNoFree-form English country names or aliases (e.g. "Uganda", "United States", "USA") resolved client-side to ISO 3166-1 alpha-3 codes and merged into countryCodes. Names that do not resolve surface as a warning. Prefer countryCodes when you already have alpha-3 codes.
extraFiltersNoExtra BrAPI filters forwarded verbatim. Valid keys vary by endpoint; brapi_describe_filters enumerates them. Named params on this tool take precedence on conflict.
abbreviationsNoShort location abbreviations.
locationNamesNoFilter by display name.
locationTypesNoLocation type — e.g. "Research Station", "Field".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
aliasNoAlias of the registered BrAPI connection the call used.
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when no rows were returned — how to broaden filters or retry.
hasMoreNoTrue when more rows exist beyond the returned set.
resultsNoLocation rows returned in-context (up to loadLimit). Bbox filter is applied after the upstream fetch.
warningsNoAdvisory messages (bbox malformed, filter overrides, capability gaps).
dataframeNoDataframe handle when the full result set was materialized as a dataframe. Query it with brapi_dataframe_query (SQL).
totalCountNoTotal rows reported by the server (or the post-bbox count when a bbox filter is active).
distributionsNoValue frequency per field across the full result set.
returnedCountNoLength of results[] after any bbox filtering.
appliedFiltersNoThe final filter map sent to the server (named + extraFilters).
refinementHintNoSuggested next-step query refinement when the result set is large.
coordinateAxisOrderNoAxis interpretation used when reading GeoJSON Point coordinates. "spec" follows the GeoJSON RFC 7946 [lon, lat, alt?] convention. "swapped" indicates the upstream server stores [lat, lon, alt?] (non-conformant) and bbox + rendered coordinates were interpreted accordingly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses several non-obvious behaviors: the client-side resolution of countryNames to alpha-3 codes, the retry with swapped coordinate axes when the spec-correct GeoJSON reading fails, the emission of a warning plus the 'coordinateAxisOrder: swapped' flag, and the materialization of large result sets as a dataframe. These are exactly the kind of behavioral traits an agent needs to predict tool behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long, but it is densely packed with necessary detail for a tool with 10 parameters and complex edge cases. It front-loads the core purpose and filters, then dives into the special behaviors. While a bit dense, no sentence is redundant, and the structure mirrors the tool's logical flow.

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?

Given the complexity — 10 parameters, nested bbox object, an output schema, and intricate fallback logic — the description covers all essential aspects: filtering options, coordinate system handling, warnings, load limits, and dataframe access. An agent has everything needed to call the tool correctly and interpret results.

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 coverage is 100%, so the baseline is 3, but the description adds substantial meaning beyond the schema. For countryNames it explains the resolution process, alias handling, and merging into countryCodes; for loadLimit it clarifies the dataframe fallback and how to query it; for bbox it explains the axis-swap retry. These enrich each parameter beyond the raw property definitions.

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 opens with a specific verb+resource: 'Find research stations / field sites' and enumerates the filter dimensions (country, abbreviation, type, location ID, free-text). This clearly distinguishes it from sibling brapi_find_* tools, which target germplasm, studies, observations, etc., even without reading the schema.

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?

The description gives concrete usage direction: it advises preferring countryCodes when alpha-3 codes are already available, explains how countryNames are resolved and merged, and tells the agent to query the resulting dataframe with brapi_dataframe_query when loadLimit is exceeded. It does not explicitly name an alternative location-finding tool, but none exists among siblings, so the guidance is sufficient.

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.