Skip to main content
Glama

Upload a file

save_file

Save a file in a space (10 MB at most): an artifact you produced (HTML report, PDF, image, spreadsheet…), so that humans and other agents can find it.

content: the content, as text (encoding="text") or as base64 for a binary file. A binary file that sits on disk, when you have a shell: do not copy its base64 by hand, which corrupts it; call create_file_upload instead and send the file with the command it gives. content_type: its type (e.g. “text/html”, “application/pdf”). Without expected_version, creates the file; if this name already exists in the space, the error gives its version: pass it as expected_version to save the next version (the old one remains readable). description, linked_notes, linked_tasks omitted: kept from the previous version. sha256: the hash of the content you mean to send; if the decoded content does not match, nothing is saved.

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": {
      "space": "<space>",
      "name": "<name>",
      "content": "<content>"
    },
    "name": "save_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFile name in the space, extension included (e.g. “report.html”).
spaceYesSpace identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces.
sha256No
contentYes
encodingNotext
descriptionNo
content_typeNo
linked_notesNo
linked_tasksNo
expected_versionNo

Output Schema

NameRequiredDescriptionDefault
idYes
versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / sha256
      Added value: +{
      +  "anyOf": [
      +    {
      +      "description": "SHA-256 of the content, in hexadecimal (64 characters).",
      +      "pattern": "^[0-9a-fA-F]{64}$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Sha256"
      +}
  2. Changed4 schema fields changed
    • changedInput schema / properties / linked_notes / anyOf
      Previous value: -[
      -  {
      -    "description": "Ids de notes de l'espace.",
      -    "items": {
      -      "format": "uuid",
      -      "type": "string"
      -    },
      -    "maxItems": 50,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Ids of notes in the space.",
      +    "items": {
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "maxItems": 50,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / linked_tasks / anyOf
      Previous value: -[
      -  {
      -    "description": "Ids de tâches de l'espace.",
      -    "items": {
      -      "format": "uuid",
      -      "type": "string"
      -    },
      -    "maxItems": 50,
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Ids of tasks in the space.",
      +    "items": {
      +      "format": "uuid",
      +      "type": "string"
      +    },
      +    "maxItems": 50,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / name / description
      Previous value: -"Nom du fichier dans l'espace, extension comprise (ex. « rapport.html »)."New value: +"File name in the space, extension included (e.g. “report.html”)."
    • changedInput schema / properties / space / description
      Previous value: -"Identifiant de l'espace, ex. « k3x9p2m4ta » : le champ `id` que donne list_spaces."New value: +"Space identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces."
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false) by disclosing the 10 MB cap, that superseded versions remain readable, and that a sha256 mismatch aborts the save with nothing written. It does not say what happens on expected_version mismatch beyond the name-collision error, and permission/auth requirements are unstated.

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-loads the verb, resource and size cap, then groups parameters one per clause, so it scans well and each sentence carries information. Some sentences pack multiple conditionals (content_type plus versioning plus inheritance), which slightly hurts skimmability but wastes little.

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?

A 10-parameter mutation tool with an output schema present, so return values need no explanation; the description still covers the size limit, versioning lifecycle, and integrity/abort behavior that an agent needs to call it safely. Nothing material is missing for correct invocation.

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?

With only 20% schema description coverage across 10 parameters, the description carries the load and mostly succeeds: it explains encoding semantics for content (text vs base64), what content_type expects, what sha256 protects against, how expected_version drives version creation, and that omitted description/linked_notes/linked_tasks are inherited from the prior version. Only name and space are left to the schema, which already documents them.

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 ('Save a file in a space'), adds a concrete scope limit (10 MB at most) and the kind of object it is for (artifacts you produced: HTML report, PDF, image, spreadsheet). It also distinguishes itself from the sibling create_file_upload by assigning that tool the on-disk-binary case.

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?

Gives explicit routing rules: for a binary file already on disk with a shell, use create_file_upload instead of hand-copying base64. It also explains the create-vs-new-version decision (omit expected_version to create; on name collision, take the version from the error and pass it as expected_version).

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