Skip to main content
Glama

Check a worker's environment before dispatch

preflight_worker

Proves a worker environment before dispatch by running probe commands under the same workspace, sandbox, and guard, returning a probe ID for create_worker or immediate acceptance results.

Instructions

Prove the environment before spending a worker. probe_commands starts a short probe worker under the same workspace, sandbox and guard and returns its id: read it with get_worker include preflight, then pass it as preflight_id to create_worker with the same arguments. acceptance alone runs those commands in cwd now and returns their results.

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": {
      "cwd": "<cwd>"
    },
    "name": "preflight_worker"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYes
modelNo
titleNo
limitsNo{max_run_ms, max_total_ms}
runnerNo
contextNo{files: [{path}] abs paths to read, contracts: [binding statements]}
sandboxNo{mode: read-only | workspace-write (default) | danger-full-access, network_access, writable_roots: [abs dirs], allowed_commands: [commands; trailing * = prefix], forbid: [paths or commands]}
workspaceNo{kind: git_worktree (default) | read_only_in_place | scratch | in_place_write, base_ref, setup: {links: [{path, source}], submodules, commands} run first, in_place_authorization, external_outputs: [{path}]}
acceptanceNo{commands, timeout_ms}: shell commands the supervisor runs in the worktree after the worker exits; all must exit 0
owned_pathsNoRequired with probe_commands
probe_commandsNoCommands the probe must run
reasoning_effortNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior: the probe runs under the same workspace, sandbox and guard, a probe consumes a worker, and 'acceptance alone' executes commands in cwd immediately and returns results. It does not cover failure semantics (what an id looks like when the probe fails, whether results are retained), nor the schema's requirement that owned_paths accompany probe_commands.

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?

Three dense sentences with the purpose front-loaded and no filler; the two-mode contrast is placed last, which reads well. The telegraphic compression ('read it with get_worker include preflight') is efficient but slightly costs readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, nested-object tool with no annotations and no output schema, the description covers the workflow and the id-return path but leaves failure modes, return shape beyond the id, and most configuration parameters unexplained. It is workable for calling the tool, not complete for calling it well.

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?

At 58% schema coverage the description must partially compensate, and it does explain the two distinguishing parameters (probe_commands, acceptance) and that create_worker should receive 'the same arguments'. The other ten parameters — model, limits, runner, context, sandbox modes, workspace kinds, owned_paths, reasoning_effort — get no added meaning beyond the schema's own nested descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening 'Prove the environment before spending a worker' is a slogan, but the following sentences give the concrete mechanism: with probe_commands the tool starts a short probe worker under the same workspace/sandbox/guard and returns its id; with acceptance alone it runs commands in cwd and returns results. That distinguishes it from create_worker and get_worker, which are named explicitly, though the description never plainly says 'this tool starts a probe worker' in the tool's own voice.

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 tells the agent to run this before dispatching a real worker, and distinguishes the two invocation modes (probe_commands vs. acceptance alone) so the agent can pick the lighter one. It also spells out the follow-up chain (get_worker include preflight, then preflight_id to create_worker). It stops short of explicit 'do not use when' conditions, e.g. what to do if a probe already exists.

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