Member role operations

3 operations named memberRole.*. Every one runs in a batch through apply_ops, dry_run_ops, the CLI or the admin.

Updated
OperationWhat it doesPermissionConfirmation
memberRole.listList the site's member roles with their labels and how many members hold each.members.managenone
memberRole.createAdd a role to the site's catalogue.members.managenone
memberRole.deleteDelete a role: every member who held it loses it, and it is taken off the requiredRoles of every draft page and article that named it (the answer counts them in stripped; memberRole.list counts them beforehand in requiredBy).members.managedestructive

memberRole.list

List the site's member roles with their labels and how many members hold each. A node gated to members names roles by key. Members are not versioned: a change takes effect at once.

permission: members.managereads onlyclass: read

Example input

{}

Input

The input is a record; see the schema below.

{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Output

FieldTypeRequiredNotes
rolesarray of objectyes
roles[].keystringyesAt most 40 characters.
roles[].labelstring | record of stringyes
roles[].memberCountintegeryesAt least 0.
roles[].requiredByobjectyes

Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.

Try it

yarn splash memberRole.list '{}' --dry-run

memberRole.create

Add a role to the site's catalogue. The key is unique on the site and never changes. Members are not versioned: a change takes effect at once.

permission: members.managewrites: memberRolesclass: transactionundo: explicit recovery

Example input

{
  "key": "press",
  "label": {
    "it": "Stampa",
    "en": "Press"
  }
}

Input

FieldTypeRequiredNotes
keystringyesAt most 40 characters.
labelstring | record of stringyes

Output

FieldTypeRequiredNotes
roleobjectyes
role.keystringyesAt most 40 characters.
role.labelstring | record of stringyes
role.memberCountintegeryesAt least 0.
role.requiredByobjectyes

Fields nested deeper are in the output schema that discover_operations answers with outputSchemas: true.

Try it

yarn splash memberRole.create '{"key":"press","label":{"it":"Stampa","en":"Press"}}' --dry-run

memberRole.delete

Delete a role: every member who held it loses it, and it is taken off the requiredRoles of every draft page and article that named it (the answer counts them in stripped; memberRole.list counts them beforehand in requiredBy). A node gated to that role alone shows to no member. Undoable: the undo brings back the role, its assignments and the requiredRoles. Run it with confirmed: ["destructive"]. Members are not versioned: a change takes effect at once.

permission: members.managewrites: memberRoles, pagesclass: transactionconfirm: destructiveundo: yes

Example input

{
  "key": "press"
}

Input

FieldTypeRequiredNotes
keystringyesAt most 40 characters.

Output

FieldTypeRequiredNotes
successtrueyes
strippedobjectyes
stripped.pagesintegeryesAt least 0.
stripped.articlesintegeryesAt least 0.

Needs confirmed: ["destructive"] on the batch, which the single-operation CLI form does not set: put it in a batch file and run yarn splash apply <file> --dry-run.

Generated from the operation registry and the MCP tool catalogue (source 6366a0d24141b7cf).

Something wrong on this page? Write to docs@librettocms.com.

Libretto docs

Colophon. These docs are a Libretto site: 68 pages in two languages, 20 guide pages imported from Markdown and 41 reference pages generated from the operation registry. Set in Softcore, with code in IBM Plex Mono. Its outline:

/ Libretto docs /start Get started /start/request-access Request access /start/workspace Your workspace /start/first-site Your first site /start/invite-a-client Invite a client /start/connect-claude Connect Claude to Libretto /build Build /build/first-page Build a page /build/layers-and-canvas Layers and canvas /build/site-components Site components /design-system Design system /design-system/tokens Colours, space and themes /design-system/components Components and variants /design-system/fonts Typography and fonts /motion Motion /motion/scenes Scenes and recipes /motion/image-sequences Image sequences /motion/reduced-motion Reduced motion /publish Publish /publish/languages Site languages /publish/versions Publish and versions /publish/members-and-forms Members and forms /publish/domains Domains /handover Hand a site to a client /glossary Glossary /agents Agents and API /agents/mcp MCP server /agents/cli CLI /agents/batches Batches /agents/errors Errors and findings /agents/operations Operations /search Search