Skip to main content
Glama

Brapi Get Study

brapi_get_study
Read-onlyIdempotent

Fetch a single study by DbId with its program, trial, and location records resolved where those lookups succeed. Response includes cheap observation/observation-unit/variable counts as drill-down signals.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "studyDbId": "<studyDbId>"
    },
    "name": "brapi_get_study"
  }
}

Input Schema

NameRequiredDescriptionDefault
aliasNoConnection alias. Omit to use alias `default`. An alias registered via brapi_connect works, and so does one the server has a URL configured for (a built-in alias, an operator-configured alias, or `default` on a deployment with a default server), which connects on first use. Calls that used a non-default alias must pass that same alias here.
studyDbIdYesStudy identifier.

Output Schema

NameRequiredDescriptionDefault
aliasNoConnection alias the call used.
errorNoPresent when the call failed. Absent on success.
studyNoCanonical study record as returned by `/studies/{id}`.
trialNoTrial the study names; omitted with a warning when not resolved.
programNoProgram the study or parent trial names; omitted with a warning when not resolved.
locationNoLocation the study names; omitted with a warning when not resolved.
warningsNoAdvisory messages — failed FK lookups, missing counts.
variableCountNoTotal observation variables (traits) measured in this study. Omitted (with a warning) when the upstream server cannot scope the count to the study — never reported as the server-wide total.
observationCountNoTotal observations recorded against this study. Omitted (with a warning) when the upstream server cannot scope the count to the study — never reported as the server-wide total.
observationUnitCountNoTotal observation units (plots, plants, samples) in this study.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / location / description
      Previous value: -"Resolved location record (when the study has a locationDbId and the FK lookup succeeded)."New value: +"Location the study names; omitted with a warning when not resolved."
    • changedOutput schema / properties / program / description
      Previous value: -"Resolved program record (when the study or parent trial identifies a program and the FK lookup succeeded)."New value: +"Program the study or parent trial names; omitted with a warning when not resolved."
    • changedOutput schema / properties / trial / description
      Previous value: -"Resolved trial record (when the study has a trialDbId and the FK lookup succeeded)."New value: +"Trial the study names; omitted with a warning when not resolved."
  2. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `upstream_rate_limited`: An uncaught BrAPI data request exhausted retries after HTTP 429. `unknown_alias`: No connection is registered under the requested alias, and the server has no base URL configured for it to connect on first use. `auth_token_exchange_failed`: Connecting the alias on first use, the SGN or OAuth token exchange against the BrAPI /token endpoint failed. `auth_no_access_token`: Connecting the alias on first use, the token endpoint answered without returning an access token. `capability_discovery_unavailable`: Neither /serverinfo nor /calls listed any call, and at least one of them timed out, was unreachable, or answered 429 or a 5xx other than 501, so nothing was cached. `upstream_unauthorized`: The BrAPI server answered HTTP 401: it requires credentials, or rejected the ones sent. `upstream_forbidden`: The BrAPI server answered HTTP 403: the credentials sent, or their absence, lack access. `alias_base_url_invalid`: The base URL configured on the server for this alias is not an absolute http(s) URL, or carries credentials. `private_address_blocked`: The base URL configured for this alias, or its token URL, is on a private or reserved address this server may not reach. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `upstream_rate_limited`: An uncaught BrAPI data request exhausted retries after HTTP 429. `unknown_alias`: No connection is registered under the requested alias, and the server has no base URL configured for it to connect on first use. `auth_token_exchange_failed`: Connecting the alias on first use, the SGN or OAuth token exchange against the BrAPI /token endpoint failed. `auth_no_access_token`: Connecting the alias on first use, the token endpoint answered without returning an access token. `capability_discovery_not_found`: Both /serverinfo and /calls return HTTP 404. `capability_discovery_unavailable`: Neither /serverinfo nor /calls listed any call, and at least one of them timed out, was unreachable, or answered 429 or a 5xx other than 501, so nothing was cached. `upstream_unauthorized`: The BrAPI server answered HTTP 401: it requires credentials, or rejected the ones sent. `upstream_forbidden`: The BrAPI server answered HTTP 403: the credentials sent, or their absence, lack access. `alias_base_url_invalid`: The base URL configured on the server for this alias is not an absolute http(s) URL, or carries credentials. `private_address_blocked`: The base URL configured for this alias, or its token URL, is on a private or reserved address this server may not reach. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "upstream_rate_limited",
      -  "unknown_alias",
      -  "auth_token_exchange_failed",
      -  "auth_no_access_token",
      -  "capability_discovery_unavailable",
      -  "upstream_unauthorized",
      -  "upstream_forbidden",
      -  "alias_base_url_invalid",
      -  "private_address_blocked",
      -  "study_not_found"
      -]New value: +[
      +  "upstream_rate_limited",
      +  "unknown_alias",
      +  "auth_token_exchange_failed",
      +  "auth_no_access_token",
      +  "capability_discovery_not_found",
      +  "capability_discovery_unavailable",
      +  "upstream_unauthorized",
      +  "upstream_forbidden",
      +  "alias_base_url_invalid",
      +  "private_address_blocked",
      +  "study_not_found"
      +]
  3. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `unknown_alias`: No connection is registered under the requested alias, and the server has no base URL configured for it to connect on first use. `auth_token_exchange_failed`: Connecting the alias on first use, the SGN or OAuth token exchange against the BrAPI /token endpoint failed. `auth_no_access_token`: Connecting the alias on first use, the token endpoint answered without returning an access token. `capability_discovery_unavailable`: Neither /serverinfo nor /calls listed any call, and at least one of them timed out, was unreachable, or answered 429 or a 5xx other than 501, so nothing was cached. `upstream_unauthorized`: The BrAPI server answered HTTP 401: it requires credentials, or rejected the ones sent. `upstream_forbidden`: The BrAPI server answered HTTP 403: the credentials sent, or their absence, lack access. `alias_base_url_invalid`: The base URL configured on the server for this alias is not an absolute http(s) URL, or carries credentials. `private_address_blocked`: The base URL configured for this alias, or its token URL, is on a private or reserved address this server may not reach. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `upstream_rate_limited`: An uncaught BrAPI data request exhausted retries after HTTP 429. `unknown_alias`: No connection is registered under the requested alias, and the server has no base URL configured for it to connect on first use. `auth_token_exchange_failed`: Connecting the alias on first use, the SGN or OAuth token exchange against the BrAPI /token endpoint failed. `auth_no_access_token`: Connecting the alias on first use, the token endpoint answered without returning an access token. `capability_discovery_unavailable`: Neither /serverinfo nor /calls listed any call, and at least one of them timed out, was unreachable, or answered 429 or a 5xx other than 501, so nothing was cached. `upstream_unauthorized`: The BrAPI server answered HTTP 401: it requires credentials, or rejected the ones sent. `upstream_forbidden`: The BrAPI server answered HTTP 403: the credentials sent, or their absence, lack access. `alias_base_url_invalid`: The base URL configured on the server for this alias is not an absolute http(s) URL, or carries credentials. `private_address_blocked`: The base URL configured for this alias, or its token URL, is on a private or reserved address this server may not reach. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "unknown_alias",
      -  "auth_token_exchange_failed",
      -  "auth_no_access_token",
      -  "capability_discovery_unavailable",
      -  "upstream_unauthorized",
      -  "upstream_forbidden",
      -  "alias_base_url_invalid",
      -  "private_address_blocked",
      -  "study_not_found"
      -]New value: +[
      +  "upstream_rate_limited",
      +  "unknown_alias",
      +  "auth_token_exchange_failed",
      +  "auth_no_access_token",
      +  "capability_discovery_unavailable",
      +  "upstream_unauthorized",
      +  "upstream_forbidden",
      +  "alias_base_url_invalid",
      +  "private_address_blocked",
      +  "study_not_found"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / properties / program / description
      Previous value: -"Resolved program record (when the study has a programDbId and the FK lookup succeeded)."New value: +"Resolved program record (when the study or parent trial identifies a program and the FK lookup succeeded)."
  5. Changed6 schema fields changed
    • changedInput schema / properties / alias / description
      Previous value: -"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."New value: +"Connection alias. Omit to use alias `default`. An alias registered via brapi_connect works, and so does one the server has a URL configured for (a built-in alias, an operator-configured alias, or `default` on a deployment with a default server), which connects on first use. Calls that used a non-default alias must pass that same alias here."
    • removedInput schema / properties / studyDbId / minLength
      Removed value: -1
    • addedInput schema / properties / studyDbId / pattern
      Added value: +"\\S"
    • changedOutput schema / properties / alias / description
      Previous value: -"Alias of the registered BrAPI connection the call used."New value: +"Connection alias the call used."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `unknown_alias`: No connection has been registered under the requested alias. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `unknown_alias`: No connection is registered under the requested alias, and the server has no base URL configured for it to connect on first use. `auth_token_exchange_failed`: Connecting the alias on first use, the SGN or OAuth token exchange against the BrAPI /token endpoint failed. `auth_no_access_token`: Connecting the alias on first use, the token endpoint answered without returning an access token. `capability_discovery_unavailable`: Neither /serverinfo nor /calls listed any call, and at least one of them timed out, was unreachable, or answered 429 or a 5xx other than 501, so nothing was cached. `upstream_unauthorized`: The BrAPI server answered HTTP 401: it requires credentials, or rejected the ones sent. `upstream_forbidden`: The BrAPI server answered HTTP 403: the credentials sent, or their absence, lack access. `alias_base_url_invalid`: The base URL configured on the server for this alias is not an absolute http(s) URL, or carries credentials. `private_address_blocked`: The base URL configured for this alias, or its token URL, is on a private or reserved address this server may not reach. `study_not_found`: Upstream returned no study record for the requested DbId. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "unknown_alias",
      -  "study_not_found"
      -]New value: +[
      +  "unknown_alias",
      +  "auth_token_exchange_failed",
      +  "auth_no_access_token",
      +  "capability_discovery_unavailable",
      +  "upstream_unauthorized",
      +  "upstream_forbidden",
      +  "alias_base_url_invalid",
      +  "private_address_blocked",
      +  "study_not_found"
      +]
  6. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safe-read profile (readOnlyHint, idempotentHint), so the description's real contribution is the partial-resolution caveat ("resolved where those lookups succeed") and the note that counts are cheap. That tells the agent to expect missing nested records rather than an error, which is genuine behavioral context not present in the annotations or schema.

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?

Two short sentences with the retrieval scope front-loaded and the response characteristics second. Every clause (partial resolution, count availability) carries information an agent would otherwise have to discover by calling.

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?

An output schema exists, so return shape need not be spelled out, and the description still flags the two things an agent most needs to know: nested lookups may be unresolved and counts are inexpensive. Only the absence of guidance on obtaining a valid studyDbId keeps it from being fully complete.

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 coverage is 100%, including the alias-connection semantics, so the schema carries the parameter burden. The description adds only the "DbId" framing of the identifier, which is marginal but consistent. Baseline 3 is appropriate.

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?

Names a specific verb and resource ("Fetch a single study by DbId") and scopes it to one record, which implicitly separates it from the listing-style sibling brapi_find_studies. It never names that sibling by name, so the differentiation relies on the reader inferring 'single' vs 'find'.

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?

Usage is only implied through "Fetch a single study by DbId" – the reader can infer this is the per-record retrieval path, but there is no explicit when-to-use, no instruction to resolve a DbId via brapi_find_studies first, and no stated exclusions.

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.