repl_spawn
Start an interactive REPL or CLI process under a pseudo-terminal and get a session ID for control. Supports environment variables, working directory, and shell execution for advanced commands.
Instructions
Start an interactive REPL or CLI process under a PTY. Returns the session id. cmd is exec'd directly (argv split, no shell): env-var prefixes, redirections (2>&1), pipes and globs are NOT interpreted — pass env via the env param, or set shell:true to run cmd through /bin/sh -c.
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": {
"id": "<id>",
"cmd": "<cmd>"
},
"name": "repl_spawn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session name (unique) | |
| cmd | Yes | Command line to spawn | |
| cwd | No | ||
| env | No | ||
| cols | No | ||
| rows | No | ||
| shell | No | Run cmd via /bin/sh -c so shell syntax (env prefixes, 2>&1, pipes, globs, &&) works. | |
| promptRegex | No |