Dapr · Capability

Dapr State Management API — State

Dapr State Management API — State. 6 operations. Lead operation: Dapr Save State. Self-contained Naftiko capability covering one Dapr business surface.

Run with Naftiko DaprState

What You Can Do

POST
Savestate — Dapr Save State
/v1/v1-0/state/{storename}
POST
Getbulkstate — Dapr Get Bulk State
/v1/v1-0/state/{storename}/bulk
POST
Querystate — Dapr Query State
/v1/v1-0/state/{storename}/query
POST
Executestatetransaction — Dapr Execute State Transaction
/v1/v1-0/state/{storename}/transaction
GET
Getstate — Dapr Get State
/v1/v1-0/state/{storename}/{key}
DELETE
Deletestate — Dapr Delete State
/v1/v1-0/state/{storename}/{key}

MCP Tools

dapr-save-state

Dapr Save State

dapr-get-bulk-state

Dapr Get Bulk State

read-only
dapr-query-state

Dapr Query State

read-only
dapr-execute-state-transaction

Dapr Execute State Transaction

dapr-get-state

Dapr Get State

read-only idempotent
dapr-delete-state

Dapr Delete State

idempotent

Capability Spec

state-management-state.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Dapr State Management API — State
  description: 'Dapr State Management API — State. 6 operations. Lead operation: Dapr Save State. Self-contained Naftiko capability
    covering one Dapr business surface.'
  tags:
  - Dapr
  - State
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DAPR_API_KEY: DAPR_API_KEY
capability:
  consumes:
  - type: http
    namespace: state-management-state
    baseUri: http://localhost:3500
    description: Dapr State Management API — State business capability. Self-contained, no shared references.
    resources:
    - name: v1.0-state-storename
      path: /v1.0/state/{storename}
      operations:
      - name: savestate
        method: POST
        description: Dapr Save State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1.0-state-storename-bulk
      path: /v1.0/state/{storename}/bulk
      operations:
      - name: getbulkstate
        method: POST
        description: Dapr Get Bulk State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1.0-state-storename-query
      path: /v1.0/state/{storename}/query
      operations:
      - name: querystate
        method: POST
        description: Dapr Query State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1.0-state-storename-transaction
      path: /v1.0/state/{storename}/transaction
      operations:
      - name: executestatetransaction
        method: POST
        description: Dapr Execute State Transaction
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1.0-state-storename-key
      path: /v1.0/state/{storename}/{key}
      operations:
      - name: getstate
        method: GET
        description: Dapr Get State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: key
          in: path
          type: string
          description: The key of the desired state.
          required: true
        - name: consistency
          in: query
          type: string
          description: Read consistency level (eventual or strong).
      - name: deletestate
        method: DELETE
        description: Dapr Delete State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: storename
          in: path
          type: string
          description: The name of the state store.
          required: true
        - name: key
          in: path
          type: string
          description: The key of the state to delete.
          required: true
        - name: concurrency
          in: query
          type: string
          description: Concurrency mode (first-write or last-write).
        - name: consistency
          in: query
          type: string
          description: Consistency level (eventual or strong).
  exposes:
  - type: rest
    namespace: state-management-state-rest
    port: 8080
    description: REST adapter for Dapr State Management API — State. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1-0/state/{storename}
      name: v1-0-state-storename
      description: REST surface for v1.0-state-storename.
      operations:
      - method: POST
        name: savestate
        description: Dapr Save State
        call: state-management-state.savestate
        with:
          storename: rest.storename
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1-0/state/{storename}/bulk
      name: v1-0-state-storename-bulk
      description: REST surface for v1.0-state-storename-bulk.
      operations:
      - method: POST
        name: getbulkstate
        description: Dapr Get Bulk State
        call: state-management-state.getbulkstate
        with:
          storename: rest.storename
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1-0/state/{storename}/query
      name: v1-0-state-storename-query
      description: REST surface for v1.0-state-storename-query.
      operations:
      - method: POST
        name: querystate
        description: Dapr Query State
        call: state-management-state.querystate
        with:
          storename: rest.storename
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1-0/state/{storename}/transaction
      name: v1-0-state-storename-transaction
      description: REST surface for v1.0-state-storename-transaction.
      operations:
      - method: POST
        name: executestatetransaction
        description: Dapr Execute State Transaction
        call: state-management-state.executestatetransaction
        with:
          storename: rest.storename
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1-0/state/{storename}/{key}
      name: v1-0-state-storename-key
      description: REST surface for v1.0-state-storename-key.
      operations:
      - method: GET
        name: getstate
        description: Dapr Get State
        call: state-management-state.getstate
        with:
          storename: rest.storename
          key: rest.key
          consistency: rest.consistency
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletestate
        description: Dapr Delete State
        call: state-management-state.deletestate
        with:
          storename: rest.storename
          key: rest.key
          concurrency: rest.concurrency
          consistency: rest.consistency
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: state-management-state-mcp
    port: 9090
    transport: http
    description: MCP adapter for Dapr State Management API — State. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: dapr-save-state
      description: Dapr Save State
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: state-management-state.savestate
      with:
        storename: tools.storename
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: dapr-get-bulk-state
      description: Dapr Get Bulk State
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: state-management-state.getbulkstate
      with:
        storename: tools.storename
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: dapr-query-state
      description: Dapr Query State
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: state-management-state.querystate
      with:
        storename: tools.storename
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: dapr-execute-state-transaction
      description: Dapr Execute State Transaction
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: state-management-state.executestatetransaction
      with:
        storename: tools.storename
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: dapr-get-state
      description: Dapr Get State
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: state-management-state.getstate
      with:
        storename: tools.storename
        key: tools.key
        consistency: tools.consistency
      outputParameters:
      - type: object
        mapping: $.
    - name: dapr-delete-state
      description: Dapr Delete State
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: state-management-state.deletestate
      with:
        storename: tools.storename
        key: tools.key
        concurrency: tools.concurrency
        consistency: tools.consistency
      outputParameters:
      - type: object
        mapping: $.