Skip to main content
Glama

save_project_artifacts

Atomically create or update project artifact files in a single batch, using replace, patch, append, or delete modes to manage sections without overwriting concurrent edits.

Instructions

[ARTIFACT TOOLS] Creates or updates one or more artifact files in a single atomic batch. Each item in updates targets one file and specifies an independent write mode — modes in the same batch do not interact.

Write modes per update item: replace_file — overwrites the entire file (creates it if absent). replace_section — replaces the content under a named ## header; raises if the header appears more than once (ADR-0011). append_section — appends a new ## section at the end of the file. replace_chunk — replaces lines start_line..end_line with new content. patch — finds old_str (must be unique in the file) and replaces it with new content. Preferred for surgical single-line edits. delete_section — removes a named ## section and its content.

Do NOT use replace_file when only a section needs updating — use patch or replace_section to avoid clobbering concurrent edits. Do NOT use this tool for source code in src/ — the source directory is read-only from the agent's perspective.

Returns: list of result objects, one per update — each with path and status. Raises: duplicate-header error (with line numbers) if replace_section finds multiple matching headers in the same file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject name
updatesYesList of write requests

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changed
    • addedInput schema / $defs / WriteRequest / properties / content / default
      Added value: +""
    • changedInput schema / $defs / WriteRequest / properties / content / description
      Previous value: -"Content to write or replace. In 'patch' mode, this is the replacement string."New value: +"Content to write or replace. In 'patch' mode, this is the replacement string — or use 'new_str' instead (alias, patch mode only)."
    • addedInput schema / $defs / WriteRequest / properties / new_str
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Alias for 'content' in 'patch' mode only. Takes precedence over 'content' if both are supplied.",
      +  "title": "New Str"
      +}
    • changedInput schema / $defs / WriteRequest / required
      Previous value: -[
      -  "path",
      -  "content"
      -]New value: +[
      +  "path"
      +]
  2. First observedv1.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it delivers: it discloses atomicity, non-interaction between modes, exact semantics for each write mode, the return shape (list of path/status), and the duplicate-header error with line numbers. It also states the source directory is read-only from the agent's perspective, which is critical behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every part earns its place: main purpose up front, a tight bulleted mode list, targeted usage warnings, and compact Returns/Raises sections. The structure makes the content skimmable and the mode list easy to parse. No filler or repetition is present.

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 tool with six modes, nested write requests, and important failure modes, the description is complete: it covers all modes, their constraints, the source-code exclusion, concurrency safety guidance, return values, and a specific error case. The agent has enough information to invoke the tool correctly across the full range of supported operations.

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?

Although schema coverage is 100%, the description adds substantial meaning beyond the schema: replace_file creates if absent, replace_section raises on duplicate headers, patch requires old_str to be unique, replace_chunk targets line ranges, and delete_section removes a named section. It also clarifies the distinction between content and new_str in patch mode and gives practical preference guidance. This significantly improves an agent's ability to choose and fill parameters.

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 description opens with a specific verb+resource: 'Creates or updates one or more artifact files in a single atomic batch.' It clearly distinguishes the tool from sibling artifact tools by scoping it to writes and explicitly excluding source code in src/. The six write modes are named and each given a one-line meaning, so an agent can understand the tool's function without ambiguity.

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 gives explicit when-not guidance: 'Do NOT use replace_file when only a section needs updating — use patch or replace_section' and 'Do NOT use this tool for source code in src/.' It also provides mode-selection guidance by describing which mode fits which scenario, such as preferring patch for surgical single-line edits. This goes well beyond a generic 'use for artifacts' statement.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/desikai-lab/Marrow'

If you have feedback or need assistance with the MCP directory API, please join our Discord server