Gremlin · Capability

Gremlin API — roles

Gremlin API — roles. 5 operations. Lead operation: Returns all roles and privileges. Self-contained Naftiko capability covering one Gremlin business surface.

Run with Naftiko Gremlinroles

What You Can Do

GET
Getrolesandprivileges — Returns all roles and privileges
/v1/roles
POST
Createcustomrole — Create a new custom role
/v1/roles
GET
Getrole — Get a custom role
/v1/roles/{roleid}
DELETE
Deletecustomrole — Delete a custom role
/v1/roles/{roleid}
PATCH
Updatecustomrole — Update a custom role
/v1/roles/{roleid}

MCP Tools

returns-all-roles-and-privileges

Returns all roles and privileges

read-only idempotent
create-new-custom-role

Create a new custom role

get-custom-role

Get a custom role

read-only idempotent
delete-custom-role

Delete a custom role

idempotent
update-custom-role

Update a custom role

idempotent

Capability Spec

gremlin-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Gremlin API — roles
  description: 'Gremlin API — roles. 5 operations. Lead operation: Returns all roles and privileges. Self-contained Naftiko
    capability covering one Gremlin business surface.'
  tags:
  - Gremlin
  - roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GREMLIN_API_KEY: GREMLIN_API_KEY
capability:
  consumes:
  - type: http
    namespace: gremlin-roles
    baseUri: https://api.gremlin.com/v1
    description: Gremlin API — roles business capability. Self-contained, no shared references.
    resources:
    - name: roles
      path: /roles
      operations:
      - name: getrolesandprivileges
        method: GET
        description: Returns all roles and privileges
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createcustomrole
        method: POST
        description: Create a new custom role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: roles-roleId
      path: /roles/{roleId}
      operations:
      - name: getrole
        method: GET
        description: Get a custom role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleId
          in: path
          type: string
          description: identifier of the role
          required: true
      - name: deletecustomrole
        method: DELETE
        description: Delete a custom role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleId
          in: path
          type: string
          description: identifier of the role
          required: true
      - name: updatecustomrole
        method: PATCH
        description: Update a custom role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: roleId
          in: path
          type: string
          description: identifier of the role
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
  exposes:
  - type: rest
    namespace: gremlin-roles-rest
    port: 8080
    description: REST adapter for Gremlin 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: getrolesandprivileges
        description: Returns all roles and privileges
        call: gremlin-roles.getrolesandprivileges
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcustomrole
        description: Create a new custom role
        call: gremlin-roles.createcustomrole
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/roles/{roleid}
      name: roles-roleid
      description: REST surface for roles-roleId.
      operations:
      - method: GET
        name: getrole
        description: Get a custom role
        call: gremlin-roles.getrole
        with:
          roleId: rest.roleId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecustomrole
        description: Delete a custom role
        call: gremlin-roles.deletecustomrole
        with:
          roleId: rest.roleId
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatecustomrole
        description: Update a custom role
        call: gremlin-roles.updatecustomrole
        with:
          roleId: rest.roleId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gremlin-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for Gremlin API — roles. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: returns-all-roles-and-privileges
      description: Returns all roles and privileges
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gremlin-roles.getrolesandprivileges
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-custom-role
      description: Create a new custom role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gremlin-roles.createcustomrole
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-custom-role
      description: Get a custom role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gremlin-roles.getrole
      with:
        roleId: tools.roleId
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-custom-role
      description: Delete a custom role
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gremlin-roles.deletecustomrole
      with:
        roleId: tools.roleId
      outputParameters:
      - type: object
        mapping: $.
    - name: update-custom-role
      description: Update a custom role
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gremlin-roles.updatecustomrole
      with:
        roleId: tools.roleId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.