drupal · Capability

Drupal JSON:API — Files

Drupal JSON:API — Files. 3 operations. Lead operation: List file entities. Self-contained Naftiko capability covering one Drupal business surface.

Run with Naftiko DrupalFiles

What You Can Do

GET
Listfiles — List file entities
/v1/file/file
GET
Getfile — Get a file entity
/v1/file/file/{uuid}
DELETE
Deletefile — Delete a file entity
/v1/file/file/{uuid}

MCP Tools

list-file-entities

List file entities

read-only idempotent
get-file-entity

Get a file entity

read-only idempotent
delete-file-entity

Delete a file entity

idempotent

Capability Spec

jsonapi-files.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Drupal JSON:API — Files
  description: 'Drupal JSON:API — Files. 3 operations. Lead operation: List file entities. Self-contained Naftiko capability
    covering one Drupal business surface.'
  tags:
  - Drupal
  - Files
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DRUPAL_API_KEY: DRUPAL_API_KEY
capability:
  consumes:
  - type: http
    namespace: jsonapi-files
    baseUri: https://example.com/jsonapi
    description: Drupal JSON:API — Files business capability. Self-contained, no shared references.
    resources:
    - name: file-file
      path: /file/file
      operations:
      - name: listfiles
        method: GET
        description: List file entities
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: file-file-uuid
      path: /file/file/{uuid}
      operations:
      - name: getfile
        method: GET
        description: Get a file entity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deletefile
        method: DELETE
        description: Delete a file entity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.DRUPAL_API_KEY}}'
  exposes:
  - type: rest
    namespace: jsonapi-files-rest
    port: 8080
    description: REST adapter for Drupal JSON:API — Files. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/file/file
      name: file-file
      description: REST surface for file-file.
      operations:
      - method: GET
        name: listfiles
        description: List file entities
        call: jsonapi-files.listfiles
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/file/file/{uuid}
      name: file-file-uuid
      description: REST surface for file-file-uuid.
      operations:
      - method: GET
        name: getfile
        description: Get a file entity
        call: jsonapi-files.getfile
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletefile
        description: Delete a file entity
        call: jsonapi-files.deletefile
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: jsonapi-files-mcp
    port: 9090
    transport: http
    description: MCP adapter for Drupal JSON:API — Files. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-file-entities
      description: List file entities
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: jsonapi-files.listfiles
      outputParameters:
      - type: object
        mapping: $.
    - name: get-file-entity
      description: Get a file entity
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: jsonapi-files.getfile
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-file-entity
      description: Delete a file entity
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: jsonapi-files.deletefile
      outputParameters:
      - type: object
        mapping: $.