Amba
Platform

Permissions / RBAC

Role-based access control with custom roles and permission strings.

Define roles with specific permissions that your app checks at runtime. Useful for admin panels, moderator tools, and premium features.

How it works

  1. Admin creates roles with arrays of permission strings
  2. Roles are assigned to users
  3. The client SDK checks if the current user has a specific permission
  4. Your app uses these permissions to show/hide features

MCP tools

ToolDescription
amba_roles_createCreate a role with permissions
amba_roles_listList all roles
amba_roles_assignAssign a role to a user

Example

Agent: "Set up admin and moderator roles"

amba_roles_create({
  project_id: "proj_xxx",
  name: "admin",
  description: "Full app administration",
  permissions: ["content:write", "users:manage", "moderation:manage", "config:write"]
})

amba_roles_create({
  project_id: "proj_xxx",
  name: "moderator",
  description: "Content moderation",
  permissions: ["content:read", "moderation:manage", "users:read"]
})

amba_roles_assign({
  project_id: "proj_xxx",
  app_user_id: "user_xxx",
  role_id: "role_admin_xxx"
})

Client API reference

MethodPathDescription
GET/client/roles/meGet current user's roles and permissions

On this page