Skip to main content
Glama

Update artifact content

artifact_update
Destructive

Replace an artifact's content with text (content), a base64 file (base64Content, filename, mimeType), or edits: up to 50 { find, replace } pairs applied in order to the current text on the server, each find occurring exactly once (else nothing changes), so you send only the passage that changes. The result is a new current version of the artifact's own type. Like a file on a computer, the write replaces the content: the earlier version is kept only when the file's history setting keeps it (its own, its folder's or its workspace's: off by default, the last N, or all) or when you send keepPrevious: true. expectedVersionId (currentVersionId from your last read or receipt) is needed only to replace workspace content another agent or person wrote with content; edits never need it. When sent it is checked first, and a stale one is CONFLICT: re-read, then retry with current values. Empty text content is valid. A table takes added records as rows (table_append_rows) without resending the rest.

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": {
      "id": "<id>"
    },
    "name": "artifact_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.
whyNoRequired for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters.
editsNoUp to 50 { find, replace } pairs applied in order to the file's current text; each find must occur exactly once, else nothing changes. Not with content.
contentNoThe new version's text. Not with base64Content or edits.
filenameNo
mimeTypeNo
descriptionNoWhat changed in this version, at most 64000 characters.
keepPreviousNoKeep the version this write replaces, whatever the file's history setting says (by default a write replaces the content and keeps no earlier version).
base64ContentNoThe new version as a base64 file, with filename and mimeType. Not with content.
expectedVersionIdNoThe artifact's current version id as you read it (currentVersionId): needed to replace content another agent or person wrote; checked first whenever sent (a stale one is CONFLICT).

Output Schema

NameRequiredDescriptionDefault
contentYes
versionYes
artifactYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / why / description
      Previous value: -"Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters."New value: +"Required for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters."
  2. Changed1 schema field changed
    • changedInput schema / properties / expectedVersionId / description
      Previous value: -"The artifact's current version id as you read it (currentVersionId): needed to replace content another agent or person wrote; checked when sent (a stale one is CONFLICT)."New value: +"The artifact's current version id as you read it (currentVersionId): needed to replace content another agent or person wrote; checked first whenever sent (a stale one is CONFLICT)."
  3. Changed4 schema fields changed
    • removedInput schema / properties / artifactId
      Removed value: -{
      -  "description": "The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.",
      -  "maxLength": 300,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / properties / description / description
      Previous value: -"What changed in this version."New value: +"What changed in this version, at most 64000 characters."
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "The artifact: its id, its alias (bare, ~agent/alias or _team/alias), or its page URL.",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "artifactId"
      -]New value: +[
      +  "id"
      +]
  4. Changed1 schema field changed
    • removedOutput schema / properties / artifact / properties / audience
      Removed value: -{
      -  "enum": [
      -    "internal",
      -    "shared"
      -  ],
      -  "type": "string"
      -}
  5. Changed1 schema field changed
    • removedInput schema / properties / creatorContext
      Removed value: -{
      -  "description": "How it was made: the prompt, tool or run.",
      -  "maxLength": 16000,
      -  "type": "string"
      -}
  6. Changed4 schema fields changed
    • changedInput schema / properties / content / description
      Previous value: -"The new version's text. Not with base64Content."New value: +"The new version's text. Not with base64Content or edits."
    • addedInput schema / properties / edits
      Added value: +{
      +  "description": "Up to 50 { find, replace } pairs applied in order to the file's current text; each find must occur exactly once, else nothing changes. Not with content.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "find": {
      +        "description": "Text that occurs exactly once in the file as the earlier edits left it.",
      +        "maxLength": 1000000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "replace": {
      +        "description": "What replaces it (may be empty).",
      +        "maxLength": 1000000,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "find",
      +      "replace"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / expectedVersionId / description
      Previous value: -"The artifact's current version id as you read it (currentVersionId): required for a workspace artifact (a stale one is CONFLICT), optional otherwise."New value: +"The artifact's current version id as you read it (currentVersionId): needed to replace content another agent or person wrote; checked when sent (a stale one is CONFLICT)."
    • addedInput schema / properties / keepPrevious
      Added value: +{
      +  "description": "Keep the version this write replaces, whatever the file's history setting says (by default a write replaces the content and keeps no earlier version).",
      +  "type": "boolean"
      +}
  7. Changed5 schema fields changed
    • addedOutput schema / properties / artifact / properties / alias
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / artifact / properties / folder
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "format": "uuid",
      +          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +          "type": "string"
      +        },
      +        "slug": {
      +          "type": "string"
      +        },
      +        "teamSlug": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "slug"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / artifact / properties / rawUrl
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / artifact / properties / title
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedOutput schema / properties / artifact / required
      Previous value: -[
      -  "id",
      -  "url",
      -  "type",
      -  "currentVersionId"
      -]New value: +[
      +  "id",
      +  "url",
      +  "rawUrl",
      +  "type",
      +  "currentVersionId",
      +  "alias",
      +  "title",
      +  "folder"
      +]
  8. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description goes further: it explains that a write replaces content and that the prior version survives only under the file/folder/workspace history setting (off by default) or keepPrevious, and that edits are all-or-nothing ('each find occurring exactly once (else nothing changes)'). It does not cover permissions/authorization requirements for writing to workspace items, which is the main remaining gap for a destructive write.

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?

Content is front-loaded with the core verb and modes before the secondary versioning/conflict caveats. It is dense with stacked parentheticals ('its own, its folder's or its workspace's: off by default, the last N, or all'), which slightly hurts scannability, but no sentence is filler.

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 10-parameter destructive mutation tool with an output schema and annotations, the description covers mode selection, versioning/history, conflict recovery, and the append alternative. What is missing is authorization/permission context and any note on what the returned version object contains (partly mitigated by the output schema).

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 80%, so the baseline is 3, but the description adds meaning the schema does not: it clarifies mutual exclusivity among content/base64Content/edits, the ordering and single-occurrence rule for find pairs, that empty text content is valid, and the CONFLICT semantics of expectedVersionId. It adds little for filename/mimeType/description, which the schema already documents.

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 first sentence gives a specific verb ('Replace') and resource ('an artifact's content') and immediately enumerates the three mutually exclusive input modes (text, base64 file, edits). It even distinguishes the tool from the sibling table_append_rows for the append-rows case, so an agent can route correctly without opening any schema.

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 states when to use each mode: edits when you want to 'send only the passage that changes', content/base64 for full replacement, and table_append_rows for tables without resending rows. It also names the precise condition making expectedVersionId necessary (replacing content another agent or person wrote) and the recovery path for a stale id ('re-read, then retry with current values').

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.