drupal · Capability

Drupal REST API — Users

Drupal REST API — Users. 3 operations. Lead operation: Get a user. Self-contained Naftiko capability covering one Drupal business surface.

Run with Naftiko DrupalUsers

What You Can Do

GET
Getuser — Get a user
/v1/user/{id}
PATCH
Updateuser — Update a user
/v1/user/{id}
DELETE
Deleteuser — Delete a user
/v1/user/{id}

MCP Tools

get-user

Get a user

read-only idempotent
update-user

Update a user

idempotent
delete-user

Delete a user

idempotent

Capability Spec

rest-users.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Drupal REST API — Users
  description: 'Drupal REST API — Users. 3 operations. Lead operation: Get a user. Self-contained Naftiko capability covering
    one Drupal business surface.'
  tags:
  - Drupal
  - Users
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DRUPAL_API_KEY: DRUPAL_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-users
    baseUri: https://example.com
    description: Drupal REST API — Users business capability. Self-contained, no shared references.
    resources:
    - name: user-id
      path: /user/{id}
      operations:
      - name: getuser
        method: GET
        description: Get a user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateuser
        method: PATCH
        description: Update a user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteuser
        method: DELETE
        description: Delete a user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.DRUPAL_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-users-rest
    port: 8080
    description: REST adapter for Drupal REST API — Users. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/user/{id}
      name: user-id
      description: REST surface for user-id.
      operations:
      - method: GET
        name: getuser
        description: Get a user
        call: rest-users.getuser
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateuser
        description: Update a user
        call: rest-users.updateuser
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteuser
        description: Delete a user
        call: rest-users.deleteuser
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-users-mcp
    port: 9090
    transport: http
    description: MCP adapter for Drupal REST API — Users. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: get-user
      description: Get a user
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-users.getuser
      outputParameters:
      - type: object
        mapping: $.
    - name: update-user
      description: Update a user
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-users.updateuser
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-user
      description: Delete a user
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-users.deleteuser
      outputParameters:
      - type: object
        mapping: $.