Zesty · Capability

Zesty Accounts API — Roles

Zesty Accounts API — Roles. 5 operations. Lead operation: Zesty List all roles. Self-contained Naftiko capability covering one Zesty business surface.

Run with Naftiko ZestyRoles

What You Can Do

GET
Getroles — Zesty List all roles
/v1/roles
POST
Createrole — Zesty Create a new role
/v1/roles
GET
Getrole — Zesty Get a role
/v1/roles/{rolezuid}
PUT
Updaterole — Zesty Update a role
/v1/roles/{rolezuid}
DELETE
Deleterole — Zesty Delete a role
/v1/roles/{rolezuid}

MCP Tools

zesty-list-all-roles

Zesty List all roles

read-only idempotent
zesty-create-new-role

Zesty Create a new role

zesty-get-role

Zesty Get a role

read-only idempotent
zesty-update-role

Zesty Update a role

idempotent
zesty-delete-role

Zesty Delete a role

idempotent

Capability Spec

accounts-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Zesty Accounts API — Roles
  description: 'Zesty Accounts API — Roles. 5 operations. Lead operation: Zesty List all roles. Self-contained Naftiko capability
    covering one Zesty business surface.'
  tags:
  - Zesty
  - Roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ZESTY_API_KEY: ZESTY_API_KEY
capability:
  consumes:
  - type: http
    namespace: accounts-roles
    baseUri: https://accounts.api.zesty.io/v1
    description: Zesty Accounts API — Roles business capability. Self-contained, no shared references.
    resources:
    - name: roles
      path: /roles
      operations:
      - name: getroles
        method: GET
        description: Zesty List all roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createrole
        method: POST
        description: Zesty Create a new role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: roles-roleZUID
      path: /roles/{roleZUID}
      operations:
      - name: getrole
        method: GET
        description: Zesty Get a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleZUID
          in: path
          type: string
          description: The ZUID of the role.
          required: true
      - name: updaterole
        method: PUT
        description: Zesty Update a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleZUID
          in: path
          type: string
          description: The ZUID of the role.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleterole
        method: DELETE
        description: Zesty Delete a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleZUID
          in: path
          type: string
          description: The ZUID of the role.
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.ZESTY_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: accounts-roles-rest
    port: 8080
    description: REST adapter for Zesty Accounts API — Roles. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/roles
      name: roles
      description: REST surface for roles.
      operations:
      - method: GET
        name: getroles
        description: Zesty List all roles
        call: accounts-roles.getroles
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrole
        description: Zesty Create a new role
        call: accounts-roles.createrole
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/roles/{rolezuid}
      name: roles-rolezuid
      description: REST surface for roles-roleZUID.
      operations:
      - method: GET
        name: getrole
        description: Zesty Get a role
        call: accounts-roles.getrole
        with:
          roleZUID: rest.roleZUID
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updaterole
        description: Zesty Update a role
        call: accounts-roles.updaterole
        with:
          roleZUID: rest.roleZUID
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleterole
        description: Zesty Delete a role
        call: accounts-roles.deleterole
        with:
          roleZUID: rest.roleZUID
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: accounts-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for Zesty Accounts API — Roles. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: zesty-list-all-roles
      description: Zesty List all roles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: accounts-roles.getroles
      outputParameters:
      - type: object
        mapping: $.
    - name: zesty-create-new-role
      description: Zesty Create a new role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: accounts-roles.createrole
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: zesty-get-role
      description: Zesty Get a role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: accounts-roles.getrole
      with:
        roleZUID: tools.roleZUID
      outputParameters:
      - type: object
        mapping: $.
    - name: zesty-update-role
      description: Zesty Update a role
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: accounts-roles.updaterole
      with:
        roleZUID: tools.roleZUID
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: zesty-delete-role
      description: Zesty Delete a role
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: accounts-roles.deleterole
      with:
        roleZUID: tools.roleZUID
      outputParameters:
      - type: object
        mapping: $.