Create a principal (user/agent) + API key
create_principalCreate a human user, agent, or service principal and issue a one-time API key with role, tenant, and scope restrictions for secure access control.
Instructions
Admin only. Create a principal (a human user, agent, or service) and issue its API key. Roles: admin, member, agent, viewer, auditor. The key is shown ONCE — store it securely; it can't be recovered (reissue by creating a new principal).
scopes is a comma-separated list of user_ids this principal may access, e.g.
"cust_5521,cust_7788". Leave empty for unrestricted (the default, and correct for a
single-tenant deployment). Set it for any multi-tenant deployment: without it, a valid
key can read any space by passing that space's user_id. An admin role is unrestricted
regardless, since org control implies reaching every space.
tenant is the org partition this key belongs to (default: the caller's own tenant). It is a
HARD boundary: every store query is filtered by it, so a key for one tenant cannot reach another
tenant's memory even under the same user_id. Set it per org in a shared multi-tenant deployment.
Only the deployment operator (an admin of the "default" tenant) may name a different tenant.
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": "create_principal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | agent | |
| name | Yes | ||
| role | No | member | |
| scopes | No | ||
| tenant | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |