Skip to main content
Glama

modal_volume_files

Destructive

Perform file operations on Modal volumes: upload, download, copy, and delete files with recursive and force options.

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.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
forceNo
pathsNo
actionYes
recursiveNo
local_pathNo
remote_pathNo
volume_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

A5/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses meaningful behavior: rm deletes remote files, force overwrites existing files, get with '-' returns contents instead of writing, and put/get are refused for paths outside the MCP_MODAL_ALLOWED_LOCAL_PATHS allowlist. It also documents the return envelope as {message, stdout, stderr} or {error}.

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 front-loads the core purpose and sibling distinction in its first two sentences, then uses a compact Args list where every line adds needed information. It is appropriately detailed for an 8-parameter tool without being padded.

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 multi-action tool with eight parameters and no enum constraints, the description covers all action modes, path conventions, directory handling, overwrite semantics, allowlist restrictions, and return value shape. The presence of an output schema further reduces the need to explain return details.

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?

Schema description coverage is 0%, so the description must fully carry parameter meaning, and it does. Every parameter is explained with functional semantics: action values and their roles, local/remote path direction, paths for cp, recursive and force behavior, and env context for the volume.

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 'Write operations on a volume's files' and enumerates the specific actions put/get/cp/rm, making the tool's purpose concrete. It also immediately distinguishes itself from list_modal_resources, so an agent can tell which tool handles file listing versus file mutation.

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?

The description explicitly says 'To LIST a volume's contents use list_modal_resources(resource="volume_files")', giving a clear when-not-to-use condition and naming the alternative. It also provides operational guidance for each action, including when recursive or force flags are needed.

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