press_keys
Send key sequences to an agent's terminal tab to approve or deny prompts, navigate menus, or answer trust dialogs. Use after capturing the screen when typed messages are not suitable.
Instructions
Press keys in the agent's tab, e.g. ["Enter"], ["Escape"], ["Down", "Enter"], ["ctrl+c"].
Read the screen with capture_screen first: approving a prompt lets the agent run that command. omp approvals: ["ctrl+Enter"] approves, ["Escape"] denies. Claude Code asks once per repository whether to trust the folder: ["Down", "Enter"] answers "Yes, I trust this folder". Prefer send_message for text.
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": {
"name": "<name>",
"keys": "<keys>"
},
"name": "press_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | ||
| name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |