Skip to main content
Glama

save_asset

Saves a binary or rich-file asset with its vault proxy node using a crash-safe write sequence, checks for duplicate titles, and returns paths and warnings.

Instructions

Save a new binary/rich-file asset with its vault proxy node. Executes the full crash-safe write sequence. Returns {uid, asset_path, vault_path}, plus tag_warnings when a tag names a project/entity/topic or repeats the node's own type or subtype — the same warning write_vault returns.

Checks for duplicates itself, like write_vault: if a node with the same title already exists it writes nothing and returns {duplicate: true, uid, path, name, message} describing the existing node. Ask the user whether to update that node or save a second copy anyway, and in the latter case call again with allow_duplicate=true.

Provide either source_path OR content — not both.

Choosing the right mode:

  • Use source_path whenever the file exists on disk. The server reads it directly; no file data passes through MCP. Works for any file size.

  • Use content only for material already present in the conversation context: text that Claude just generated, or base64 data returned by another tool in this same session. Never base64-encode a file yourself just to pass it here — use source_path instead.

Args: source_path: Absolute path to a file on disk. content: File content as a UTF-8 string (text) or base64-encoded string (binary). Use is_base64=True for binary content. is_base64: Set True when content is base64-encoded binary data. format: File extension: html, pdf, png, mp4, mp3, mov, etc. mime_type: MIME type: text/html, application/pdf, video/mp4, etc. title: Title for the vault proxy node. summary: One-paragraph summary. tags: 3-6 freeform lowercase hyphenated tags. domains: One or more domain taxonomy values. relations: List of {uid, type} dicts linking to other vault nodes. node_type: Vault node type: 'document' or 'asset'. subtype: asset → 'book', 'video', 'music', 'podcast', 'presentation', 'visual', 'physical'. document → 'report', 'transcript', 'spec', 'plan', 'meeting-notes', 'essay', 'journal', or 'note' (the default when omitted). author: Author or creator name. published_at: Publication or release date string. language: ISO 639-1 language code. allow_duplicate: Write even though a node with this title exists. Only after the user has chosen "save as new".

Input Schema

NameRequiredDescriptionDefault
tagsNo
titleYes
authorNo
formatYes
contentNo
domainsNo
subtypeNo
summaryNo
languageNo
is_base64No
mime_typeYes
node_typeNoasset
relationsNo
source_pathNo
published_atNo
allow_duplicateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied the description carries the full burden and does: it discloses the crash-safe write, the exact success return shape {uid, asset_path, vault_path}, the tag_warnings condition, and the duplicate short-circuit return {duplicate: true, uid, path, name, message} with instructions to escalate to the user. It also states that 'it writes nothing' on duplicate, which is the key irreversible-behavior fact an agent needs.

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 purpose, return shape, and the duplicate decision before the detail, then cleanly sectioned into mode selection and Args. It is long, and the Args block partly restates prose that appears above (source_path vs content, allow_duplicate), so it is a touch repetitive rather than wasteful.

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?

For a 16-parameter mutation tool with no annotations and no output schema, the description supplies everything needed: return values, duplicate semantics, the two input modes and their constraints, and per-parameter meaning. Nothing material is left for the agent to guess before calling it.

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 Args block is the only source of parameter meaning and it delivers: it covers all 16 parameters, enumerates subtype values per node_type ('book'/'video'/... vs 'report'/'transcript'/... with 'note' as default), gives format and mime_type examples, constrains tags to '3-6 freeform lowercase hyphenated tags', and describes relations as {uid, type} dicts. This adds substantial meaning the bare schema lacks.

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?

States a specific verb and resource: 'Save a new binary/rich-file asset with its vault proxy node', and calls out that it runs the same crash-safe sequence and duplicate detection as write_vault. An agent can tell it apart from write_vault, though the overlap (node_type may be 'document') and the unmentioned asset-specific siblings like resolve_asset and find_unregistered_assets keep it short of a perfect 5.

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?

Gives an explicit 'Choosing the right mode' block: use source_path whenever the file exists on disk, use content only for material already in context, and a hard exclusion ('Never base64-encode a file yourself just to pass it here'). It also prescribes the duplicate-handling workflow — ask the user to update or save a copy, and only then re-call with allow_duplicate=true.

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