Skip to main content
Glama

modal_volume_files

Destructive

Upload, download, copy, or delete files in a Modal volume to manage its contents. Handles recursive directory operations, overwrites, and per-call environment or profile selection.

Instructions

Write operations on a volume's files. To LIST a volume's contents use
list_modal_resources(resource="volume_files").

Args:
    action: "put" (upload local_path → remote_path), "get" (download remote_path →
        local_path; "-" returns the contents instead of writing a file), "cp" (copy
        inside the volume, using `paths`), "rm" (delete remote_path).
    volume_name: Volume name.
    local_path: Local source ("put") or destination ("get", default ".").
    remote_path: In-volume destination ("put", default "/", trailing "/" keeps the
        filename), source ("get"), or target ("rm").
    paths: For "cp": sources followed by the destination, e.g. ["a.txt", "dest/"].
    recursive: Needed to "rm" or "cp" a directory.
    force: Overwrite existing files ("put"/"get").
    env: Modal environment the volume lives in.
    profile: Modal profile for this call only. Defaults to the active profile.

Returns: {message, stdout, stderr} or {error}. When MCP_MODAL_ALLOWED_LOCAL_PATHS is
set, "put"/"get" are refused for local paths outside the allowlist.

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": {
      "action": "<action>",
      "volume_name": "<volume_name>"
    },
    "name": "modal_volume_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
forceNo
pathsNo
actionYes
profileNo
recursiveNo
local_pathNo
remote_pathNo
volume_nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.1
    • addedInput schema / properties / profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Profile"
      +}
  2. Addedv0.2.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent/open-world behavior, but the description adds real context beyond them: the return shape {message, stdout, stderr} or {error}, that force is required to overwrite, that recursive is needed for directories, and that MCP_MODAL_ALLOWED_LOCAL_PATHS can cause put/get to be refused. It does not describe what rm destroys or confirmation behavior, keeping it short of a 5.

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-loaded with a one-line purpose, then an Args block with one line per parameter and a short Returns sentence. Dense and scannable; the only minor cost is a slightly long tail on the local-path allowlist note.

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 nine-parameter destructive mutation tool with zero schema descriptions, the definition supplies per-action parameter meaning, overwrite semantics, and an environmental constraint. An output schema exists so return values are covered; remaining gaps are edge-case behavior for directory operations rather than missing core information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does document all nine parameters including per-action meanings of local_path, remote_path, and paths. However some semantics remain thin - env defaults, whether volume_name must pre-exist, and format expectations for paths - so the compensation is good but not complete.

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 class and resource ("Write operations on a volume's files") and immediately names the sibling that handles the read side, list_modal_resources(resource="volume_files"). An agent can distinguish this from the listing tool without inspecting either 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?

Explicitly routes LIST operations to a sibling and gives per-action guidance for when to use each of put/get/cp/rm, including the special "-" destination for reading contents. It stops short of stating exclusions or prerequisites beyond that split, so it is clear context rather than a full when/when-not matrix.

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