← Back to Docs

Scopes & Permissions

Developer

Scopes & Permissions

Every API key carries a set of scopes that decide exactly what it may do. Scopes are enforced the same way for both the REST surface and the MCP endpoint: a key that lacks the scope for an operation is rejected, and — over MCP — a tool the key can’t use never even appears in tools/list.

A scope is one of two things:

  • an engineering-role bundle (worker, reviewer, release, lead), or
  • a granular capability (a single named capability).

You can mix both on one key. Grant the least a key needs.

Role bundles

Bundles are a convenient shorthand for a coherent set of capabilities, modeled on the roles in a software delivery workflow.

BundleWhat it can doDeliberately cannot
workerSearch and read code, edit files, run tests and lint, push its own branch, open a pull request, and request a review. Drives one work item end-to-end.Merge, approve, or deploy.
reviewerStrictly read-only verification: search and read code, and comment on pull requests.Write files, run commands, push, merge, or deploy.
releaseDeploy and roll back.Everything else (no code editing, no merging).
leadThe superset of worker + release, plus opening and triaging issues. Can carry an item through implementation, release it, and file issues.

Separation of powers is intentional. A worker cannot approve or merge its own pull request — that requires reviewer/merge capabilities held by a different key or person. Compose roles across separate keys rather than granting one key everything.

Granular capabilities

For fine-grained control, grant individual capabilities instead of (or alongside) a bundle:

CapabilityWhat it grants
search_codeSearch across the project’s code
read_fileRead files and project/source-control status
write_fileCreate and edit files
run_testsRun the project’s test suite
run_lintRun the project’s linter
open_prPush a branch and open a pull request
comment_on_prComment on / review a pull request
request_reviewRequest review on a pull request
merge_prMerge a pull request (governance-gated)
deployDeploy the app or trigger a mobile build (governance-gated)
rollbackCancel or roll back a deployment (governance-gated)
open_issueCreate and update issues
query_ciRead build and deploy status and logs

Reads are always permitted for a valid key — granular capabilities matter most for the actions that change your project.

The capabilities in the table above are the original (pre-M74) names. Newer capabilities — and the currently-recommended way to request any of them — use the colon-form scope ids below (env:read, db:query, and so on). Both forms resolve to the same underlying permission engine; colon form is preferred going forward because it groups related reads/writes by resource (db:read / db:write / db:query) instead of one bundle of mixed-name capabilities.

Capability scopes (colon-form)

This is the full scope vocabulary an API key can request individually, grouped by resource. Every scope here also appears in the key-creation UI.

ScopeGrantsTool(s) in Agent Tools
env:readRead project environment variablespriiism_env_list
env:writeSet and delete project environment variablespriiism_env_set, priiism_env_delete
config:readRead viiibin.config.jsonpriiism_config_get
config:writeWrite viiibin.config.jsonpriiism_config_set
db:readRead the per-project database schemapriiism_db_schema
db:writeProvision the per-project databasepriiism_db_provision
signing:readRead mobile signing credential statuspriiism_signing_status
signing:writeCreate/update mobile signing credentialspriiism_signing_credentials_set
github:readList repos, milestones, and labelspriiism_github_repos_list, priiism_github_milestones_list, priiism_github_labels_list
github:writeCreate/update milestones and labelspriiism_github_milestone_create, priiism_github_label_create
actions:readRead the AI action approval queuepriiism_actions_list
actions:writeApprove or reject queued AI actionspriiism_action_approve, priiism_action_reject, priiism_action_batch
jobs:readRead background job statuspriiism_job_status
jobs:runTrigger background jobspriiism_job_execute, priiism_job_pause, priiism_job_resume
plan:readRead the plan graphpriiism_proposals_list
plan:writeMutate the plan graphpriiism_plan_propose, priiism_plan_dryrun, priiism_plan_push
security:scanTrigger security scans and read findingspriiism_security_scan, priiism_security_findings
domains:writeBind, verify, and inspect custom domainspriiism_domain_bind, priiism_domain_verify, priiism_domain_status
identity:writeConfigure the project’s managed identity-provider settingspriiism_identity_get, priiism_identity_configure
deployTrigger deploys and rollbackspriiism_deploy_web, priiism_deploy_rollback
conversations:readRead conversation historypriiism_conversations_list
org:readRead org membershippriiism_org_members_list
readConvenience scope covering conversations:read + org:read(same as above)
autonomy:readRead autonomous run statuspriiism_autonomy_status, priiism_seos_roles_list

Dangerous scopes (opt-in only)

These four scopes are never included in any role bundle (worker/reviewer/release/lead) or in the read convenience scope. Each grants broad, hard-to-review access — arbitrary SQL, arbitrary shell execution, full-codebase search, or an autonomous multi-step agent run that spends credits and opens real pull requests. You must explicitly list one of these scope ids when creating an API key; requesting them is a strong signal the key should be short-lived and narrowly project-scoped.

ScopeGrantsToolWhy it’s dangerous
db:queryRun arbitrary SQL against the per-project databasepriiism_db_queryUnrestricted reads of sensitive data and destructive writes (DELETE, DROP, etc).
container:execRun arbitrary shell commands in the project’s sandboxpriiism_container_execExecutes arbitrary commands in the build environment, gated only by the platform command allowlist.
code:searchRun full-project semantic (RAG) code searchpriiism_code_searchBroad, index-backed search across the entire codebase, including files the caller wouldn’t otherwise read one-by-one.
autonomy:runStart an autonomous multi-step agent runpriiism_autonomy_startSpends credits and opens real pull requests on its own, without per-step approval.

A key that lacks one of these scopes gets 403 insufficient_scope calling the corresponding tool or route — see When a scope is missing.

Governance-gated capabilities

merge_pr, deploy, and rollback are marked governance-gated. Even when a key holds the scope, the platform may still require an owner’s approval before the action runs, depending on your organization’s policy. If a gate is active you’ll get a clear message explaining that the capability is held back pending approval, rather than a silent success.

Safe-by-default vs. dangerous capabilities

The capabilities above are safe by default: reads are read-only, and the actuating ones map to reviewable, reversible operations (a pull request, a deploy you can roll back).

A separate class of high-risk scopes is off by default and can only be granted by naming it explicitly when you create a key — it is never part of a role bundle. See Dangerous scopes (opt-in only) for the full list (db:query, container:exec, code:search, autonomy:run) and what each one grants.

Choosing scopes

  • A CI deploy botrelease (or just the deploy capability), on a project-scoped key.
  • A read-only dashboard or reporting integration → a key with no action capabilities; reads work with any valid key.
  • An AI client you want to build featuresworker, so it can edit, test, and open pull requests — but never merge or deploy on its own.
  • An automation that files issuesopen_issue (add it to another bundle if needed).

When a scope is missing

If a key lacks the scope for an operation, the platform responds with 403 insufficient_scope (and, when known, a requiredScope naming what’s missing) — see API Reference → Errors. Re-scope the key from Account Settings → Developer, or issue a new key with the right scopes. Over MCP, a tool the key can’t use simply won’t be listed.

Next steps