Neo4j · Capability

Neo4j HTTP API — Transactions

Neo4j HTTP API — Transactions. 4 operations. Lead operation: Open a new explicit transaction. Self-contained Naftiko capability covering one Neo4j business surface.

Run with Naftiko Neo4jTransactions

What You Can Do

POST
Opentransaction — Open a new explicit transaction
/v1/db/{databasename}/tx
POST
Executeintransaction — Execute statements in an open transaction
/v1/db/{databasename}/tx/{transactionid}
DELETE
Rollbacktransaction — Rollback a transaction
/v1/db/{databasename}/tx/{transactionid}
POST
Committransaction — Commit a transaction
/v1/db/{databasename}/tx/{transactionid}/commit

MCP Tools

open-new-explicit-transaction

Open a new explicit transaction

execute-statements-open-transaction

Execute statements in an open transaction

rollback-transaction

Rollback a transaction

idempotent
commit-transaction

Commit a transaction

Capability Spec

http-transactions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Neo4j HTTP API — Transactions
  description: 'Neo4j HTTP API — Transactions. 4 operations. Lead operation: Open a new explicit transaction. Self-contained
    Naftiko capability covering one Neo4j business surface.'
  tags:
  - Neo4j
  - Transactions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NEO4J_API_KEY: NEO4J_API_KEY
capability:
  consumes:
  - type: http
    namespace: http-transactions
    baseUri: http://localhost:7474
    description: Neo4j HTTP API — Transactions business capability. Self-contained, no shared references.
    resources:
    - name: db-databaseName-tx
      path: /db/{databaseName}/tx
      operations:
      - name: opentransaction
        method: POST
        description: Open a new explicit transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: db-databaseName-tx-transactionId
      path: /db/{databaseName}/tx/{transactionId}
      operations:
      - name: executeintransaction
        method: POST
        description: Execute statements in an open transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: rollbacktransaction
        method: DELETE
        description: Rollback a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: db-databaseName-tx-transactionId-commit
      path: /db/{databaseName}/tx/{transactionId}/commit
      operations:
      - name: committransaction
        method: POST
        description: Commit a transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: basic
      username: '{{env.NEO4J_USER}}'
      password: '{{env.NEO4J_PASS}}'
  exposes:
  - type: rest
    namespace: http-transactions-rest
    port: 8080
    description: REST adapter for Neo4j HTTP API — Transactions. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/db/{databasename}/tx
      name: db-databasename-tx
      description: REST surface for db-databaseName-tx.
      operations:
      - method: POST
        name: opentransaction
        description: Open a new explicit transaction
        call: http-transactions.opentransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/db/{databasename}/tx/{transactionid}
      name: db-databasename-tx-transactionid
      description: REST surface for db-databaseName-tx-transactionId.
      operations:
      - method: POST
        name: executeintransaction
        description: Execute statements in an open transaction
        call: http-transactions.executeintransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: rollbacktransaction
        description: Rollback a transaction
        call: http-transactions.rollbacktransaction
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/db/{databasename}/tx/{transactionid}/commit
      name: db-databasename-tx-transactionid-commit
      description: REST surface for db-databaseName-tx-transactionId-commit.
      operations:
      - method: POST
        name: committransaction
        description: Commit a transaction
        call: http-transactions.committransaction
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: http-transactions-mcp
    port: 9090
    transport: http
    description: MCP adapter for Neo4j HTTP API — Transactions. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: open-new-explicit-transaction
      description: Open a new explicit transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-transactions.opentransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: execute-statements-open-transaction
      description: Execute statements in an open transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-transactions.executeintransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: rollback-transaction
      description: Rollback a transaction
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: http-transactions.rollbacktransaction
      outputParameters:
      - type: object
        mapping: $.
    - name: commit-transaction
      description: Commit a transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: http-transactions.committransaction
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.