Compact a Kiro session
kiro_session_compactCompacts an idle Kiro session's context and returns the resulting context usage; fails with TURN_ACTIVE while a turn is running.
Instructions
Compact an idle session's context with _kiro/session/compact, like /compact, and return the context usage reported afterwards. Fails with TURN_ACTIVE while a turn runs.
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": {
"session_id": "<session_id>"
},
"name": "kiro_session_compact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Kiro session id (sess_<uuid>). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kiro | Yes | ||
| session_id | Yes | ||
| context_usage | Yes |