Couchbase · Capability

Couchbase Query Service REST API — Query Execution

Couchbase Query Service REST API — Query Execution. 2 operations. Lead operation: Execute a SQL++ query via GET. Self-contained Naftiko capability covering one Couchbase business surface.

Run with Naftiko CouchbaseQuery Execution

What You Can Do

GET
Executequeryget — Execute a SQL++ query via GET
/v1/query/service
POST
Executequerypost — Execute a SQL++ query via POST
/v1/query/service

MCP Tools

execute-sql-query-get

Execute a SQL++ query via GET

read-only idempotent
execute-sql-query-post

Execute a SQL++ query via POST

read-only

Capability Spec

query-service-rest-query-execution.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Couchbase Query Service REST API — Query Execution
  description: 'Couchbase Query Service REST API — Query Execution. 2 operations. Lead operation: Execute a SQL++ query via
    GET. Self-contained Naftiko capability covering one Couchbase business surface.'
  tags:
  - Couchbase
  - Query Execution
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    COUCHBASE_API_KEY: COUCHBASE_API_KEY
capability:
  consumes:
  - type: http
    namespace: query-service-rest-query-execution
    baseUri: https://localhost:8093
    description: Couchbase Query Service REST API — Query Execution business capability. Self-contained, no shared references.
    resources:
    - name: query-service
      path: /query/service
      operations:
      - name: executequeryget
        method: GET
        description: Execute a SQL++ query via GET
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: statement
          in: query
          type: string
          description: The SQL++ statement to execute
          required: true
        - name: timeout
          in: query
          type: string
          description: Maximum execution time for the query (e.g., 10s, 5m)
        - name: readonly
          in: query
          type: boolean
          description: Whether to restrict the query to read-only operations
        - name: pretty
          in: query
          type: boolean
          description: Whether to format the query results with indentation
      - name: executequerypost
        method: POST
        description: Execute a SQL++ query via POST
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: basic
      username: '{{env.COUCHBASE_USER}}'
      password: '{{env.COUCHBASE_PASS}}'
  exposes:
  - type: rest
    namespace: query-service-rest-query-execution-rest
    port: 8080
    description: REST adapter for Couchbase Query Service REST API — Query Execution. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/query/service
      name: query-service
      description: REST surface for query-service.
      operations:
      - method: GET
        name: executequeryget
        description: Execute a SQL++ query via GET
        call: query-service-rest-query-execution.executequeryget
        with:
          statement: rest.statement
          timeout: rest.timeout
          readonly: rest.readonly
          pretty: rest.pretty
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: executequerypost
        description: Execute a SQL++ query via POST
        call: query-service-rest-query-execution.executequerypost
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: query-service-rest-query-execution-mcp
    port: 9090
    transport: http
    description: MCP adapter for Couchbase Query Service REST API — Query Execution. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: execute-sql-query-get
      description: Execute a SQL++ query via GET
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: query-service-rest-query-execution.executequeryget
      with:
        statement: tools.statement
        timeout: tools.timeout
        readonly: tools.readonly
        pretty: tools.pretty
      outputParameters:
      - type: object
        mapping: $.
    - name: execute-sql-query-post
      description: Execute a SQL++ query via POST
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: query-service-rest-query-execution.executequerypost
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.