rex_session_create
Create a persistent Rex session owned by rex-mcp and return its session ID and first block ID. Use it when programs must keep running beyond a one-off command.
Instructions
Create a session (rex new). rex-mcp owns it, so it may write to it. Returns its ID and first block ID. The session stays up for as long as its programs do; it is not closed for being idle. Prefer rex_run with wait_seconds for a one-off command, which closes that block when the command exits. A program in this session can close its own block when it finishes by running rex-mcp close.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "rex_session_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| label | No | ||
| window | No | Label for the first window | |
| command | No | Program and arguments, one word per element |