Skip to main content
Glama

Set workspace limits

workspace_limits_set
DestructiveIdempotent

Set caps on a workspace's running sandboxes, CPU, memory, and disk to prevent overuse; exceeding a limit blocks new sandboxes or deploys while existing services and data remain.

Instructions

Cap what a workspace may run at once (owner only, with a key that has no scopes). A field left out stays as it is; null removes that limit. Past maxRunningSandboxes a sandbox create, fork or resume fails with WORKSPACE_SANDBOX_LIMIT. While CPU, memory or disk use is at a cap, deploys, restarts, scale-ups, new databases and volume growth fail with WORKSPACE_USAGE_LIMIT; running services keep running and data stays.

Input Schema

NameRequiredDescriptionDefault
maxDiskGbNoGB its databases and volumes may hold
maxCpuVcpusNovCPU its apps and databases may be using
maxMemoryMbNoMB its apps and databases may be using
workspaceIdYesWorkspace ID (see workspace_list)
maxRunningSandboxesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description goes well beyond that: it discloses owner-only auth and scope requirements, patch semantics (omitted field is preserved, null removes), and the exact downstream failure modes (WORKSPACE_SANDBOX_LIMIT on create/fork/resume, WORKSPACE_USAGE_LIMIT on deploys/restarts/scale-ups/volume growth) plus the reassurance that running services and data survive. This is exactly the behavioral context annotations cannot carry.

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 the core action and the auth precondition, then the update semantics, then consequences. Dense with no filler, though the third sentence packs several consequence clauses together and could be split for scanability.

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, no-output-schema mutation with 5 params, the description supplies auth requirements, patch semantics, and full downstream impact. Remaining gaps are minor: it does not say what the call returns or what error a non-owner receives.

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?

With 80% schema coverage the schema already documents four of five params, but the description adds the crucial semantics the schema lacks: omitted means unchanged and null means clear the limit. It also explains maxRunningSandboxes, the one param with no schema description, through the sandbox-limit failure narrative. It does not state units or accepted ranges, hence 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?

"Cap what a workspace may run at once" names a specific verb (cap/set) and resource (workspace resource limits), and the enumeration of affected dimensions (sandboxes, CPU, memory, disk) makes it unmistakably the write counterpart to workspace_limits_get. An agent can tell what this does 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 Guidelines4/5

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

Explicitly states the caller precondition (owner only, key with no scopes), which is the main gate on invoking it. It also describes what happens when limits are hit, giving the agent context for when setting limits matters. It does not name workspace_limits_get as the read alternative, so it falls 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.