Skip to main content
Glama

runtime_sandboxes_files_watch

Watch a sandbox file or directory for changes. start (path, recursive, events, include and exclude globs, timeoutMs, webhook: true to have Runtime send the changes to the account's webhooks) returns the watch and a cursor; read (watchId, cursor, waitMs) returns the events since it, repeated writes folded with a count, and nextCursor; list; stop (watchId). Access events are opt-in. At most 4 watches per sandbox; a watch ends after timeoutMs (1 h by default, zero until stopped). Reading never wakes a paused sandbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
pathNo
actionYes
cursorNo
eventsNoOnly these event types. Default: all of create, write, remove, rename, chmod.
waitMsNo
batchMsNoGather events this long and send them as one batch, folding repeated writes to a file into one event with a count. Default 100.
excludeNoSkip paths matching these globs. A directory excluded (`node_modules`, `dist/**`) is not watched at all.
includeNoReport only paths matching one of these globs, relative to path (`**/*.py`; a bare `*.py` matches at any depth).
watchIdNoA watch's id.
webhookNoAlso send its changes to the account's webhooks as sandbox.files.changed events, read by Runtime without waking the sandbox: at most one event every 2 s a watch, 16 such watches an account. Default false.
recursiveNoWatch every directory under it too. Default false.
timeoutMsNoThe watch ends by itself after running this long; 0 lasts until stopped or the sandbox ends. Default 3600000 (1 h).
maxWatchesNoDirectories watched at most; past it a `limit` notice. Default 10000.
idempotencyKeyNoOptional: left out, one is made and returned as idempotencyKey. Send it back only to retry this exact call after a temporary error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only supply the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false); the description goes well beyond them by disclosing the 4-watch cap, webhook rate limit (one event per 2 s, 16 watches per account), timeout behavior (1 h default, 0 = until stopped), and the key operational fact that reading never wakes a paused sandbox.

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?

Dense, front-loaded and organized by action with semicolon-separated clauses, so no sentence is wasted. It is information-rich rather than bloated, though the action list runs long enough that an agent must parse several clauses to find the one it needs.

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 15-param mutation-capable tool with no output schema, the description supplies the return contract for read (events since cursor, folded writes with count, nextCursor) and the lifecycle constraints. It leaves the semantics of batchMs, maxWatches and idempotencyKey to the schema, but overall an agent has enough to call it correctly.

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 67% schema coverage across 15 params, the description carries real weight by mapping arguments to actions (path/recursive/events/include/exclude/timeoutMs/webhook for start; watchId/cursor/waitMs for read) and explaining folded write counts. It omits batchMs, maxWatches and idempotencyKey, which only the schema documents, but the core semantics are covered.

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 states a specific verb+resource ('Watch a sandbox file or directory for changes') and then enumerates the four sub-actions (start/read/list/stop) with their arguments and return shapes. An agent can distinguish this watch-based change-notification tool from the sibling runtime_sandboxes_files_read/write tools 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?

It clearly delineates when each action applies: start returns a watch plus cursor, read consumes the cursor, list enumerates watches, stop terminates one. It also notes access events are opt-in and that watches cap at 4 per sandbox. It never names an alternative tool or an explicit 'use this instead of X' condition, so it stops 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.