Skip to main content
Glama

Update artifact

update_artifact
Destructive

Replace parts of an existing artifact with content you wrote, keeping its folder ID, link and sharing. If the artifact is shared by link, the change is visible to anyone with that link, including people outside the workspace; get_file_sharing shows who can open it. Only what is sent changes: each listed file is written (null deletes it), each edit replaces one exact match of its find text in an existing text file, description replaces the card text, and title renames it; every other file is kept. Prefer edits for small changes to a large file. Read the current files with list_files and read_file first. Call show_artifact afterwards so the user sees the change. Requires write permission; deleting a file also needs delete permission, which API keys don't have. Checks run before anything is written; if storage fails partway, files already saved stay, so re-read before retrying, and re-sending the same files is safe. For multi-step Replo work, call skills with name "replo".

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": {
      "projectId": "<projectId>",
      "fileId": "<fileId>"
    },
    "name": "update_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsNoTargeted replacements in existing text files, applied in order, so a small change doesn't resend the whole file. If any edit fails to match exactly once, nothing is saved. A path can't appear in both files and edits.
filesNoFiles to write, keyed by relative path; null deletes that file. Files not listed are kept. index.html is the page. Link sibling files with relative URLs; scripts may load only from the artifact, cdnjs, jsDelivr /npm/, unpkg, the Tailwind CDN and the jQuery CDN, and other outbound requests are blocked. Each *.insights.json file is an Insights report document (version "2.0", the shape get_insights_report returns) whose saved queries run live for each viewer; embed one with <replo-report src="./sales.insights.json"></replo-report>. report.insights.json is the artifact's main report, the one the Insights report tools read, and without index.html Replo renders the page around it.
titleNoRenames the artifact.
fileIdYesThe .artifact folder ID, including for Insights artifacts; never an embedded report file ID.
projectIdYes
descriptionNoThe one-line summary shown on the artifact's card.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Though annotations already declare destructive and open-world behavior, the description adds non-obvious context: shared-by-link changes are visible outside the workspace, write permission is required and deletion additionally needs delete permission that API keys lack, validation runs before any write, and a partial storage failure leaves already-saved files in place so a re-read is needed before retrying. The retry-safe note for re-sent files is scoped to files and does not conflict with idempotentHint=false.

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 core action and its sharing consequence, then workflow, then failure semantics. Dense but every clause carries information; some sentences are long run-ons that could be split for scannability.

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 destructive, nested-schema mutation tool with no output schema, the description covers permissions, visibility side effects, validation ordering, partial-failure recovery, companion tool calls, and even the insights-report file conventions. An agent has everything needed to invoke it correctly.

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 already high (83%), but the description still adds real meaning: null in files deletes, each edit replaces one exact match in an existing text file, description replaces the card text while title is a rename, and a path cannot appear in both files and edits. That interaction logic is not fully spelled out by the schema alone.

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 ("Replace parts of an existing artifact") plus the key invariant it preserves (folder ID, link, sharing), which separates it from update_file and create_artifact. The sentence about only listed files changing makes the scope of the operation unambiguous.

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 sequences the workflow: read with list_files and read_file first, call show_artifact afterwards, prefer edits for small changes to a large file, and route multi-step Replo work to skills with name "replo". These are concrete when-to-use and when-to-use-something-else pointers rather than implied guidance.

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.

Resources