Skip to main content
Glama

Resize volume

volume_resize
Idempotent

Resize a persistent sandbox volume in place to grow or shrink its storage quota; no data copy, and the attached sandbox keeps running.

Instructions

Use this when the user wants to grow or shrink a persistent sandbox volume. The resize happens in place and online: the size is a filesystem quota, no data is copied, it completes in well under a second, and an attached sandbox keeps running. Both growing and shrinking are allowed, but a shrink must leave at least 10% of the new size free — check lastUsedBytes in volume_list first and pick a size comfortably above it. Calling again with the current size is a no-op. Allowed sizes are per-project (minSizeGb/maxSizeGb from GET /api/projects/:projectId/volume-limits); the server rejects anything outside that range with invalid_volume_size, so do not assume a maximum. Returns the updated volume plus sizeEnforced (whether the quota is actually enforced on the backing storage). Error codes: invalid_volume_size, volume_not_resizable, volume_too_full_to_shrink (choose a larger size), volume_resize_in_progress (retry shortly), volume_not_provisioned, volume_capacity_unavailable (not enough room on the node to grow), volume_resize_timeout (size was left unchanged; safe to retry).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeGbYesNew size in GB (whole number, at least 1)
volumeYesVolume name or ID (from volume_list)
projectYesProject name, slug, or ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark it as non-read-only, idempotent, and non-destructive, and the description adds substantial operational context: the resize happens in place and online, changes a filesystem quota, copies no data, finishes sub-second, and leaves attached sandboxes running. It also enumerates failure codes and their retry semantics, exceeding annotation coverage.

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?

The use case and critical constraints are front-loaded in the first sentences, and later sentences cover behavior, limits, and error handling without obvious repetition. It is dense and could be formatted for scanability, but every element serves correct invocation for a multi-error mutation.

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?

The description covers inputs, behavior, limits, return fields (updated volume and sizeEnforced), and every known error mode. No output schema exists, so this disclosure is necessary and sufficient. It also names the prerequisite volume_list and limits endpoint, making it complete for the operation's complexity.

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 100%, so the baseline is 3. The description adds real meaning for sizeGb beyond the schema's 'whole number, at least 1' by stating per-project limits, the 10%-free shrink rule, no-op-on-same-size behavior, and the need to check lastUsedBytes. It does not add comparable depth for project or volume, so it is not a 5.

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?

Names the exact operation—resizing a persistent sandbox volume—and states its scope: in-place, online, grow or shrink. It distinguishes itself from volume_list by pointing to it only as a prerequisite check for lastUsedBytes. An agent can identify what will happen without opening the schema.

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?

Explicitly states when to use it (user wants to grow or shrink a volume) and gives critical preconditions: check lastUsedBytes in volume_list first, maintain 10% free on shrink, and do not assume a maximum because limits are per-project. It also covers idempotent repeat behavior and error conditions, leaving little inference.

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