Skip to main content
Glama

artifact_write

Store or update a long document (markdown, JSON or text) behind a pointer memory. For agents.md, skills.md, assertions.md, a project plan: anything past one memory's 768-token cap.

CREATE: name ("assertions.md"), summary (the pointer memory: what the document is and why; search finds the pointer, never the body), body, topics, optional collection. UPDATE: artifact_id + base_rev_id (the rev_id you last read) + either body (whole document) or section + content (replace one block: markdown heading path ["Plan","Risks"], or JSON pointer "/rules/3"; content starting with a heading line replaces the heading too, so what artifact_read returned can be edited and written back). 409 STALE_BASE: someone saved since you read; re-read, re-apply. 409 CONFLICT: divergent heads; write with merged_rev_ids=[the other heads].

Size: Plus 512 KB; Pro and above no product limit; Free not available. Retention: every save is a revision. Kept: everything from the last 24h, then the newest per day to 30 days, then the newest per week, within 30 days (Plus) or 365 days (Pro+), at most 500. The head and pinned revisions (artifact_pin) are never removed; a shared artifact keeps the longest window any of its writers had. Thinning runs only when this artifact is saved.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "artifact_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoWhole document text.
nameNoFile name; extension sets the format (.md markdown, .json json, else text).
topicsNoCREATE: pointer search words.
contentNoReplacement for section.
sectionNoMarkdown heading path (array of heading texts) or JSON pointer string.
summaryNoCREATE: pointer memory text. Front-loaded: what the document is + why.
collectionNoCREATE: shared collection. Omit=default. "me"=personal.
occurrenceNo0-based pick when the section path matches more than one heading.
artifact_idNoPointer memory id. Omit to create.
base_rev_idNoUPDATE: the head rev_id you read.
macro_topicsNoCREATE: project/domain.
merged_rev_idsNoOther heads this write resolves.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only state readOnlyHint=false, destructiveHint=false and openWorldHint=false; the description adds substantial context beyond that: size limits per plan tier, revision retention/thinning rules, the guarantee that head and pinned revisions survive, quota interactions, and full conflict semantics. It also clarifies that the pointer memory, not the body, is what search surfaces — a behavioral trait an agent could not infer from schema or annotations.

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?

Purpose is front-loaded in sentence one, then blocked into CREATE/UPDATE, error handling, size, and retention, which makes it scannable. The dense parenthetical style and the lengthy retention paragraph are more than a call decision strictly needs, though the retention detail is genuinely non-inferable.

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 12-parameter mutation tool with no output schema, it covers creation, partial updates, conflicts, limits and retention thoroughly. The notable gap is the return value: with no output schema, the agent is never told what a successful write yields (presumably the new artifact_id and rev_id), which matters for chaining into artifact_read or artifact_pin.

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 100%, so the baseline is 3, and the description genuinely earns more by explaining interplay the schema cannot: base_rev_id is 'the rev_id you last read,' section takes a markdown heading path or JSON pointer, and content replaces the heading too so read-then-write round-trips cleanly. It leaves occurrence, macro_topics, collection and topics largely to the schema, so it stops short of full coverage.

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 opening sentence gives a specific verb pair and resource: 'Store or update a long document (markdown, JSON or text) behind a pointer memory.' It immediately distinguishes itself from the memory_* siblings via the 768-token cap rationale and implicitly from artifact_read by framing this as the write side of that pair.

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 spells out two concrete recipes (CREATE with name/summary/body/topics, UPDATE with artifact_id + base_rev_id + body or section/content) and names the threshold that selects this tool over plain memory_add: 'anything past one memory's 768-token cap.' It also gives recovery paths for the two failure modes (409 STALE_BASE, 409 CONFLICT), which is when-to-use guidance at the error level.

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