Skip to main content
Glama

Update file

update_file
DestructiveIdempotent

Rename or move a file or folder in the user's Replo Files, within its project, or replace a file's contents with source: inline text, inline base64, or an asset already in this Replo project, as in create_file (text without contentType keeps the file's type). It only changes files in Replo; nothing is fetched from a URL or an outside service. Read the file with read_file before replacing it. The file keeps its id and sharing; folders take no source. Set parentId to null to move it to My Files. Without source, the contents stay; name conflicts never overwrite. 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": {
      "fileId": "<fileId>"
    },
    "name": "update_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
fileIdYes
sourceNoNew contents for the file: inline text, inline base64, or an asset already in this Replo project. Nothing is fetched from a URL or an outside service. Replaces the contents in place; its id and sharing stay. Folders take no source.
parentIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / source / description
      Previous value: -"Replaces the file's contents in place; its id and sharing stay. Folders take no source."New value: +"New contents for the file: inline text, inline base64, or an asset already in this Replo project. Nothing is fetched from a URL or an outside service. Replaces the contents in place; its id and sharing stay. Folders take no source."
  2. Changed1 schema field changed
    • addedInput schema / properties / source
      Added value: +{
      +  "description": "Replaces the file's contents in place; its id and sharing stay. Folders take no source.",
      +  "oneOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "contentType": {
      +          "maxLength": 255,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "text": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "const": "text",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "text"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "contentType": {
      +          "maxLength": 255,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "dataBase64": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "const": "base64",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "dataBase64",
      +        "contentType"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "assetId": {
      +          "format": "uuid",
      +          "type": "string"
      +        },
      +        "type": {
      +          "const": "asset",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "assetId"
      +      ],
      +      "type": "object"
      +    }
      +  ]
      +}
  3. Changed3 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / properties / fileId / pattern
      Removed value: -"^([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)$"
    • changedInput schema / properties / parentId / anyOf
      Previous value: -[
      -  {
      -    "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"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "format": "uuid",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, and readOnly=false, and the description adds genuinely new behavior: the id and sharing survive the update, folders reject source, name conflicts never overwrite, and nothing is fetched from outside Replo. The 'nothing fetched from outside' line sits in mild tension with openWorldHint=true, but it reads as a deliberate scope clarification rather than a contradiction. No return shape or failure modes are described, which keeps it at 4.

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

Conciseness3/5

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

The purpose is front-loaded, but the opening sentence is a long run-on stacking three distinct operations and their caveats. The trailing pointer to the 'replo' skill is useful onboarding but is bolted on rather than integrated, and several clauses (folders take no source, nothing fetched from a URL) are repeated across description and embedded schema text.

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 destructive, four-parameter mutation with no output schema and thin schema coverage, the description covers the essential contract: what changes, what is preserved, and what happens with missing input. Gaps remain around permissions/auth requirements, behavior when an assetId or parentId is invalid or cross-project, and any confirmation of the resulting representation.

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 only 25%, so the description has to carry the load and mostly does: it explains all three source variants, notes that text without contentType preserves the file's type, defines parentId=null as the My Files destination, and clarifies that omitting source is a no-op. The name parameter is only implicitly covered via 'rename', with the 255-char limit left to the schema.

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 concrete verbs and a resource: rename, move, or replace contents of a file or folder, scoped to Replo Files or a project. It explicitly distinguishes itself from create_file (substituting contents 'as in create_file') and from read_file, so an agent can place it among siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives real operational guidance: read the file with read_file before replacing contents, set parentId to null to move to My Files, and omit source to leave contents untouched. It stops short of an explicit when-not-to-use statement (e.g., when to prefer create_file or update_artifact), so it falls just short of a 5.

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