Skip to main content
Glama

Attach asset

attach_asset

Attach an image asset to a markdown review so the viewer serves and renders it at the exact src your draft uses. Survives every source revision.

Instructions

Attach an image to a review so the viewer serves and renders it. Pass the file bytes as content_b64 (base64) and name as the exact src the draft uses (for example "/assets/x.png" or "fig/y.svg"). Attach once; it survives every update_source revision. On the local stdio server you can pass path instead, a local file path the wrapper reads and encodes for you, which keeps large files out of the conversation. A remote server cannot read your files, so it needs content_b64. Returns the stored name and the served url.

Input Schema

NameRequiredDescriptionDefault
idYesthe opaque review id
nameYesthe draft <img> src this asset backs (the match key)
pathNolocal file path, read and base64-encoded by the local stdio server (not available on a remote server)
content_b64Nothe file bytes, base64-encoded (required on a remote server)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare that this is a non-read-only, non-destructive, closed-world write. The description goes further by disclosing the persistence behavior (survives update_source revisions), the local-versus-remote file access constraint, and the return payload (stored name and served url). It stops short of covering overwrite semantics or any size/error limits.

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?

Four dense sentences, front-loaded with purpose and followed by the key parameter rule, the one-time-attach rule, the transport-specific alternative, and the return value. Nothing is padding, and the local/remote distinction is stated in the order an agent would need it.

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 four-parameter mutation tool with no output schema, the description covers the return value, the persistence contract, and transport-specific parameter requirements, which is close to everything an agent needs. The remaining gap is re-attach/overwrite behavior for an already-backed `name`.

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 coverage is 100%, so the baseline would be 3, but the description adds genuine meaning: `name` is the exact `<img>` src the draft uses and acts as the match key, with concrete format examples ('/assets/x.png', 'fig/y.svg'), and it explains the `path` versus `content_b64` tradeoff by deployment mode. That is meaning beyond the schema's own field descriptions.

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 opens with a specific verb and resource: 'Attach an image to a review so the viewer serves and renders it.' It names the downstream effect (rendering in the viewer) and, combined with sibling names like list_assets and update_source, an agent can immediately tell this is the write-side counterpart to asset listing.

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

Usage Guidelines4/5

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

It gives clear operating guidance: attach once because the asset survives every update_source revision, use `path` on the local stdio server to avoid pulling bytes through the conversation, and use `content_b64` on a remote server that cannot read local files. It does not say what happens if the same `name` is attached twice, which is the main when-to-call edge case left open.

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