Skip to main content
Glama

Brapi Get Image

brapi_get_image
Read-onlyIdempotent

Fetch image bytes for up to 5 imageDbIds and return them inline as type: image content blocks. Falls back to the metadata imageURL when the server lacks dedicated image-content delivery or that request fails. No filesystem side-effects.

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": {
      "imageDbIds": "<imageDbIds>"
    },
    "name": "brapi_get_image"
  }
}

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.
imageDbIdsYesFetch the first 5 distinct image IDs. Additional IDs are returned for the next call.

Output Schema

NameRequiredDescriptionDefault
aliasNoConnection alias the call used.
errorNoPresent when the call failed. Absent on success.
errorsNoImages that could not be loaded, one entry per id.
imagesNoSuccessfully loaded images.
warningsNoPer-image advisories; non-image MIME responses are errors, not successful images.
deferredImageDbIdsNoPass these remaining IDs in the next image call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / imageDbIds / description
      Previous value: -"1–5 image identifiers."New value: +"Fetch the first 5 distinct image IDs. Additional IDs are returned for the next call."
    • removedInput schema / properties / imageDbIds / maxItems
      Removed value: -5
    • addedOutput schema / properties / deferredImageDbIds
      Added value: +{
      +  "description": "Pass these remaining IDs in the next image call.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • 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. `images_unsupported`: The BrAPI server does not advertise /images. 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_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. `images_unsupported`: The BrAPI server does not advertise /images. 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",
      -  "images_unsupported"
      -]New value: +[
      +  "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",
      +  "images_unsupported"
      +]
  2. Changed6 schema fields changed
    • changedOutput schema / properties / images / items / description
      Previous value: -"Successfully loaded image payload."New value: +"Metadata for a successfully loaded image; bytes appear once in content[] image blocks."
    • removedOutput schema / properties / images / items / properties / data
      Removed value: -{
      -  "description": "Base64-encoded image bytes.",
      -  "type": "string"
      -}
    • changedOutput schema / properties / images / items / properties / mimeType / description
      Previous value: -"Content-Type of the byte response, else the metadata mimeType, else application/octet-stream."New value: +"Validated image MIME from the response header, or metadata when absent; lowercase without parameters."
    • changedOutput schema / properties / images / items / required
      Previous value: -[
      -  "imageDbId",
      -  "mimeType",
      -  "sizeBytes",
      -  "source",
      -  "data",
      -  "metadata"
      -]New value: +[
      +  "imageDbId",
      +  "mimeType",
      +  "sizeBytes",
      +  "source",
      +  "metadata"
      +]
    • changedOutput schema / properties / warnings / description
      Previous value: -"Per-image advisories for loaded payloads that appear suspect — e.g. the imageURL fallback returned a non-image MIME type, suggesting the upstream URL is broken."New value: +"Per-image advisories; non-image MIME responses are errors, not successful images."
    • changedOutput schema / properties / warnings / items / description
      Previous value: -"Per-image advisory for loaded-but-suspect content (e.g. non-image MIME)."New value: +"Per-image advisory for successfully loaded images."
  3. Changed7 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 / imageDbIds / items / minLength
      Removed value: -1
    • addedInput schema / properties / imageDbIds / items / 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. `images_unsupported`: BrAPI server does not advertise /images in /serverinfo. 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. `images_unsupported`: The BrAPI server does not advertise /images. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "unknown_alias",
      -  "images_unsupported"
      -]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",
      +  "images_unsupported"
      +]
    • changedOutput schema / properties / images / items / properties / mimeType / description
      Previous value: -"Actual MIME type of the returned bytes."New value: +"Content-Type of the byte response, else the metadata mimeType, else application/octet-stream."
  4. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, so the safety profile is covered. The description adds genuinely new behavior: the fallback to the metadata `imageURL` when the server lacks image-content delivery or the request fails, and an explicit 'no filesystem side-effects' clarification that preempts an agent assuming bytes land on disk. It does not say what happens when both the content request and the URL fallback fail.

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, front-loaded with the primary action and return shape, followed by fallback and side-effect clarifications in decreasing order of importance. No filler or repetition of the title.

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?

For a two-parameter read tool with a full output schema and complete annotation coverage, this is nearly sufficient: primary behavior, fallback path, and side-effect expectations are all stated. The only gap is failure/partial-result behavior when neither the content request nor the URL fallback succeeds.

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%, including the alias resolution rules and the 'first 5 distinct IDs' batching note, so the schema carries the parameter burden. The description only restates the 5-ID cap and adds no format or syntax detail beyond the schema, which is the expected baseline here.

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?

The description gives a specific verb and resource ('Fetch image bytes') plus the scope ('up to 5 imageDbIds') and the output shape ('inline as `type: image` content blocks'), which distinguishes it from a metadata search like brapi_find_images. It never names a sibling tool, so an agent must infer that the find_* tools are the discovery path and this is the content-fetch path.

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 implied rather than stated: this is the tool to call once you already hold imageDbIds. There is no explicit 'use X to search for IDs first' routing, and no stated exclusions. The batching guidance about 5 IDs partly lives in the schema rather than the description.

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.