Skip to main content
Glama

chroot

Destructive

Change the root directory to run commands in an isolated filesystem environment for testing software.

Instructions

Plan or run a command inside a changed root directory. Destructive: isolates command execution to a new filesystem root. May require elevated privileges. Use --dry_run to preview. Requires --allow_chroot for execution; fails safely otherwise. Use to test software in isolated environments. Not for simple directory changes — use 'cd' or path arguments on other commands. See also 'runcon'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allow_chrootNoAllow a real chroot execution where supported.
command_argsNoCommand and arguments to run inside the root.
dry_runNoReport without running the command.
max_output_bytesNoMaximum captured stdout/stderr bytes each.
rootYesDirectory to use as the new root.
timeoutNoSafety timeout for the command.
Behavior5/5

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

Beyond the destructiveHint annotation, the description adds behavioral traits: 'Destructive: isolates command execution to a new filesystem root. May require elevated privileges. Use --dry_run to preview. Requires --allow_chroot for execution; fails safely otherwise.' This provides concrete context on what destruction entails, privilege requirements, and safe failure modes, which the annotation alone does not convey.

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 is concise at three sentences plus two short ones, front-loaded with the primary action and key traits. Every sentence adds distinct information: purpose, destructiveness, prerequisites, usage context, and alternatives. No redundancy or filler.

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?

Given the tool's moderate complexity, no output schema, and rich input schema with 100% coverage, the description adequately covers purpose, behavioral impact, usage context, prerequisites, and safety mechanisms. It also mentions alternatives (runcon, cd) and the --dry_run preview, making it self-contained for correct invocation.

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 description coverage is 100%, so baseline is 3. The description adds meaning by connecting --dry_run to preview and --allow_chroot to execution, which reinforces their behavioral significance. It does not elaborate on all six parameters, but the key ones are contextualized. This provides marginal added value beyond the schema descriptions.

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 clearly states 'Plan or run a command inside a changed root directory' with a specific verb ('run') and resource ('command inside changed root'). It distinguishes from siblings by noting 'Not for simple directory changes — use 'cd' or path arguments on other commands. See also 'runcon'.' This meets the criteria for a specific verb+resource that differentiates from sibling tools.

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 provides explicit usage guidance: 'Use to test software in isolated environments. Not for simple directory changes — use 'cd' or path arguments on other commands. See also 'runcon'.' It also mentions using --dry_run to preview and that --allow_chroot is required for execution. This clearly instructs when to use and when not to use, with alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server