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_create_roleCreate a role with permissions
amba_list_rolesList all roles
amba_assign_roleAssign a role to a user

Example

Agent: "Set up admin and moderator roles"

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

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

amba_assign_role({
  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

Database tables

TablePurpose
rolesRole definitions with name and permissions array
user_rolesUser-to-role assignments

On this page