Skip to main content
Glama

download_asset

Download one asset of an item to local disk, gated by a size check.

SAR products can be multiple GB, so this is a two-step handshake: call it
first with ``confirm=False`` (the default) to get the byte size without
downloading, then again with ``confirm=True`` to actually fetch. Returns
``{asset, path, bytes}`` on download, or a size-and-hint object when
confirmation is still required.

On a public host (``umbra serve --public``, COG streaming off),
``confirm=True`` is refused. The error includes the asset href and its
size in bytes and tells you to download the file locally (or run a local
``uvx --from 'umbra-py[mcp]' umbra-mcp`` server for ``download_asset``).
``confirm=False`` still returns the size.

``url`` is a STAC JSON URL, or a product filename
(``2025-05-17-17-43-46_UMBRA-08_GEC.tif``) or acquisition stem
(``2025-05-17-17-43-46_UMBRA-08``). A filename or stem is resolved through
the catalog index the same way as ``get_item``. The hosted server already
has that index. A local server needs ``umbra index fetch``.

``asset`` selects the file. All of these work:

- a product type, any case: ``GEC``, ``gec``, ``SICD``
- a schema v2 key, including a collision suffix: ``gec``, ``gec_2``,
  ``csi``, ``sidd``, ``csi_sidd``, ``sicd``, ``cphd``, ``metadata``,
  ``stac_metadata``, ``di_gif``, ``file``, ``file_tif``
- the original filename (the asset's ``umbra-py:filename``)

``GEC`` and ``gec`` are the primary file. ``gec_2`` is the second GEC,
not the primary. A name that matches nothing raises with the item's v2
keys listed (``gec, sicd, cphd``, …), not the uppercase product types.

Input Schema

NameRequiredDescriptionDefault
urlYes
assetNoGEC
confirmNo
dest_dirNo.

Output Schema

NameRequiredDescriptionDefault

No arguments

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?

With no annotations, the description carries the full burden and does so: it discloses return shape ({asset, path, bytes} vs size-and-hint), the public-host refusal and its error contents, the index requirement for local servers, and that unmatched asset names raise while listing v2 keys.

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?

Front-loaded with the two-step handshake, which is the most decision-critical fact. The asset-form enumeration is long but justified at 0% schema coverage; a few passages (e.g. repeated public-host detail) could be trimmed without loss.

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, yet the description still usefully previews return values. Behavior, prerequisites, and error paths are complete; the only missing piece an agent needs is guidance on dest_dir.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It thoroughly documents url (STAC URL, filename, or stem with index resolution), asset (product types, v2 keys with collision suffixes, filenames, and the gec vs gec_2 distinction), and confirm semantics. dest_dir is left completely undocumented, leaving one gap.

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?

States a specific verb and resource ('Download one asset of an item to local disk') plus the size-check gating constraint. It distinguishes itself from siblings by referencing get_item-style resolution and the local/hosted server distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly prescribes a two-step workflow: call with confirm=False to get size, then confirm=True to fetch. It also states the when-not case (public host refuses confirm=True) and the alternative remedy (download locally or run a local umbra-mcp server).

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.