haldir_create_session
Create a scoped session for an AI agent and receive a session_id for subsequent calls, with spend limits and permission scopes controlling secret and approval access.
Instructions
Create a scoped Haldir session for an AI agent. Returns a session_id the agent uses for every subsequent tool call. Use spend_limit to cap the agent's total spend; scopes (e.g. ['stripe:refund', 'postgres:read']) gate which secrets and approvals it can access.
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": {
"agent_id": "<agent_id>"
},
"name": "haldir_create_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Seconds until the session expires (default 3600) | |
| scopes | No | Permission scopes | |
| agent_id | Yes | Human-readable agent identifier | |
| spend_limit | No | Max USD the session can spend (0 = no limit) |