Skip to main content
Glama

run_in_env_impl

Execute shell commands in isolated Nix environments for specific programming languages, ensuring clean dependency management without system clutter.

Instructions

Run a shell command in a disposable Nix shell for the chosen language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageYes
commandYes
extra_packagesNo
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Core handler function that validates packages, constructs Nix shell command, runs it with timeout, and returns JSON result.
    def run_in_env_impl(
        language: str, command: str, extra_packages: list[str] | None = None, timeout_seconds: int = 120
    ) -> str:
        """Run a shell command in a disposable Nix shell for the chosen language."""
        extras = _validate_packages(extra_packages or [])
        cmd = _nix_shell_command(language.lower(), extras, command)
        result = _run(cmd, timeout=timeout_seconds)
        return json.dumps(result, indent=2)
  • Registers the run_in_env_impl function as an MCP tool named 'run_in_env'.
    run_in_env = mcp.tool()(run_in_env_impl)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the shell is 'disposable' (implying ephemeral/temporary) and specifies the environment ('Nix shell for the chosen language'), which adds some context. However, it lacks critical details like security implications, resource limits, error handling, or what 'run' entails (e.g., synchronous execution, output capture). For a tool that executes arbitrary commands, this is a significant gap.

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 a single, efficient sentence that front-loads the core action ('Run a shell command') and context. There is no wasted verbiage or redundancy, making it highly concise and well-structured for quick comprehension.

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?

Given the tool's complexity (executing commands in a specialized environment), lack of annotations, and 0% schema description coverage, the description is incomplete. It does cover the basic purpose and environment, but since an output schema exists, it doesn't need to explain return values. However, it misses critical behavioral and parameter details needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only implicitly references 'language' and 'command' ('shell command in a disposable Nix shell for the chosen language'), but doesn't explain what 'language' entails (e.g., programming language, version), what 'command' format is expected, or mention 'extra_packages' and 'timeout_seconds' at all. With 4 parameters and no schema descriptions, this is inadequate.

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 description clearly states the action ('Run a shell command') and the resource/environment ('in a disposable Nix shell for the chosen language'), making the purpose immediately understandable. It doesn't explicitly differentiate from the sibling tool 'list_languages', which serves a completely different function, but the distinction is obvious enough that a 4 is appropriate rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. It mentions the environment ('disposable Nix shell for the chosen language') but doesn't explain why one would choose this over other execution methods or what scenarios it's designed for.

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/StealthBadger747/mcp-omnienv-nix'

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