Skip to main content
Glama

asset_add

Add a local image or font file to the CoDesign workspace, returning a workspace:// URI to embed the asset in designs.

Instructions

Add a local image or font file to the workspace so it can be used in a design. Copies the file bytes into the content-addressed asset store at assets/<sha>.<ext>. The bring-your-own arm of the asset family: asset_search finds an existing asset, asset_generate makes one, asset_add takes one off your disk — all three return a workspace:// uri to embed in edit. (To turn a design FILE into a new design, use import.)

Returns JSON: { uri, httpUrl, mimeType, kind, bytes, note? }. uri (a workspace:// URI) is the durable handle — embed it in a subsequent edit (image fill, or engine.asset.apply; for a font, as both setFont's uri and typeface.fonts[].uri), NEVER httpUrl and NEVER the original file:// path, so the design stays loadable after a restart or rewind. httpUrl is a fetch link for opening the asset now.

Files are classified by content (magic bytes) first, extension second: a misnamed file is stored under its actual type, and note explains any correction, rescue, or unverifiable content.

Make-available only: it never edits a scene and never creates a revision — do the placement in edit.

Source: { path } — an absolute path to a file the server can read. Local-only (this backend shares your disk); on a hosted server this arm is not offered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it delivers: it explains the side effect (copies bytes), the storage location (assets/<sha>.<ext>), the classification logic (magic bytes first), the fact it never edits a scene or creates a revision, and the local-only constraint. It also warns against using httpUrl or the original file path for embedding, which is critical for durability. This is exemplary transparency.

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 well-organized, with purpose, usage, return format, classification, and constraints in separate paragraphs. Every sentence adds value, though it could be tightened slightly without losing critical information. It is front-loaded with the core purpose and then expands into necessary detail.

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?

Despite having only one parameter, a nested source object, no output schema, and no annotations, the description covers everything an agent needs: return format, how to use the uri in edit, classification behavior, and the local-only limitation. It is fully self-sufficient for correct invocation.

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 description coverage is 0%, so the description must compensate. It does: it explains the source object's structure ({ path }), that path must be absolute and readable by the server, and that it is local-only. This adds meaning beyond the schema's terse description and fully clarifies the single parameter.

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 states a specific verb ('Add'), resource ('local image or font file'), and purpose ('so it can be used in a design'). It also differentiates itself from siblings by naming asset_search and asset_generate as the alternatives for finding and generating assets, and import for turning design files into designs. This makes the tool's role unmistakable.

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?

It explicitly contrasts with asset_search and asset_generate, and provides a clear when-to-use rule: use this when you have a file on disk. It also states when not to use it (never for placement, use edit) and points to import for a different scenario. This gives the agent unambiguous selection criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.