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.

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.
imageDbIdsYes1–5 image identifiers.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. 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."
  3. 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 readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds genuinely useful behavior beyond that: inline content-block delivery, an automatic fallback to the metadata imageURL when image-content delivery is unavailable or fails, and an explicit 'no filesystem side-effects' assurance.

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 tight sentences with the primary action front-loaded, the fallback behavior second, and a one-clause side-effect disclaimer last. Nothing is redundant or padded.

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 format details are not required of the description, and annotations cover mutability. The description covers the key behavioral surprise (fallback) and side-effect status; the only notable omission is routing guidance relative to brapi_find_images.

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%: the alias parameter's long description (default behavior, registered vs built-in aliases, alias stickiness) and the imageDbIds 1–5 constraint are fully documented in the schema. The description only restates the 5-ID cap, adding no semantics beyond the schema, so the baseline 3 applies.

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 states a specific verb and resource ('Fetch image bytes') plus a precise scope ('up to 5 imageDbIds') and the delivery format ('inline as `type: image` content blocks'). It is clearly distinguishable from search-style siblings like brapi_find_images, but it never names a sibling to make the boundary explicit, so it lands at 4 rather than 5.

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: the tool takes known imageDbIds, so an agent infers it is a retrieval step after brapi_find_images. The fallback sentence gives a conditional behavior, but there is no explicit 'use this when / not when' guidance or named alternative.

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.