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

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)
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