Skip to main content
Glama

save-artifact

Save Claude-generated files such as HTML, XLSX, PPTX, or Markdown into a product's assets directory, using UTF-8 for text or base64 for binary content.

Instructions

Save any arbitrary file (e.g. .html, .xlsx, .pptx, .md) generated by Claude into the product's assets directory. Supports both text and base64 encoded binary files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "productSlug": "<productSlug>",
      "filename": "<filename>",
      "fileContent": "<fileContent>"
    },
    "name": "save-artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
encodingNoThe encoding of the fileContent. Use 'base64' for binary files like .xlsx or .pptx.utf-8
filenameYesThe name of the file to save, e.g. '2026-05-26-user-stories-viewer.html' or 'financial-model.xlsx'
fileContentYesThe full string content of the file. If encoding is base64, this must be the base64 string.
productSlugYesThe product slug

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the write destination (assets directory) and the binary/text distinction, but says nothing about overwrite behavior, permission or auth requirements, size limits, or what happens on filename collision.

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?

Two short sentences, front-loaded with the core action and destination. The encoding sentence is largely redundant with the schema's encoding description, which keeps it from being maximally tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation tool with no annotations and no output schema, the description covers purpose and destination but leaves the agent guessing about overwrite semantics, return value, and error behavior. Adequate but with clear gaps.

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 coverage is 100%, so all four parameters are already documented in the schema, including the base64 guidance for encoding. The description's second sentence restates that same encoding distinction rather than adding new meaning, so 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?

States a specific verb ('Save') and resource ('any arbitrary file ... into the product's assets directory'), with concrete examples of file types. It does not explicitly distinguish itself from siblings like save-presentation-file or save-pdd, so an agent must infer that this is the generic fallback.

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?

Implies usage context ('generated by Claude', text or base64 binary), which is enough to know roughly when to reach for it. It gives no explicit when-not guidance and never names an alternative tool for structured artifacts such as presentations or PDDs.

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