Set up agent with grants and hosts
stack_setup_agentSet an agent up in one step: register it, give it its first grants on connections the account already holds, and declare the hosts those connections' credentials may be sent to. All of it is one human approval whose card lists every part, instead of one approval for each grant and one for each host list. The person confirms it in the chat, and the confirmation lists every part. When human approval is required and the chat client supports MCP elicitation, the person is asked to confirm the exact change in the client; the change is applied only after they approve, and a rejection changes nothing. Otherwise it returns GOVERNANCE_APPROVAL_REQUIRED with approval_id and approval_url, the page for that one approval, and the same payload sent with governance_approval_id after approval applies the change. An approval is single-use, bound to the exact payload, and expires after 24 hours. Use stack_register_agent to register an agent alone and stack_grant_agent_access to change a grant later. The service connections must already exist (stack_list_connected_services). A setup that cannot succeed, for example a scope the connection does not hold or an agent name already in use, is refused before anyone is asked. Returns the agent, the grants made and the host lists set.
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>"
},
"name": "stack_setup_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Agent name (lowercase, letters/digits/hyphens/underscores) | |
| grants | No | The agent's first grants, one per connection. | |
| on_warning | No | Action on warning flags (default: notify) | |
| description | No | Optional description | |
| on_critical | No | Action on critical flags (default: notify) | |
| eval_traffic | No | Mark this agent as test or benchmark traffic (default: false). It is part of the same approval. | |
| allowed_hosts | No | The hosts each named connection's credential may be sent to. A host the connection does not already allow is part of this approval. | |
| credential_access | No | Credential proxy posture (default: proxy_only). Agents never receive raw credentials. | |
| accountability_mode | No | Accountability mode (default: logged). 'enforced' holds every call for a person's approval. | |
| governance_approval_id | No | Approval id (gvr_*) from the first call, after a person approved it |