Snowflake · Capability

Snowflake SQL REST API — statements

Snowflake SQL REST API — statements. 3 operations. Lead operation: Submit a Sql Statement for Execution.. Self-contained Naftiko capability covering one Snowflake business surface.

Run with Naftiko Snowflakestatements

What You Can Do

POST
Submitstatement — Submit a Sql Statement for Execution.
/v1/api/v2/statements
GET
Getstatementstatus — Check the Status of the Execution of a Statement.
/v1/api/v2/statements/{statementhandle}
POST
Cancelstatement — Cancel the Execution of a Statement.
/v1/api/v2/statements/{statementhandle}/cancel

MCP Tools

submit-sql-statement-execution

Submit a Sql Statement for Execution.

check-status-execution-statement

Check the Status of the Execution of a Statement.

read-only idempotent
cancel-execution-statement

Cancel the Execution of a Statement.

Capability Spec

sql-rest-statements.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Snowflake SQL REST API — statements
  description: 'Snowflake SQL REST API — statements. 3 operations. Lead operation: Submit a Sql Statement for Execution..
    Self-contained Naftiko capability covering one Snowflake business surface.'
  tags:
  - Snowflake
  - statements
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SNOWFLAKE_API_KEY: SNOWFLAKE_API_KEY
capability:
  consumes:
  - type: http
    namespace: sql-rest-statements
    baseUri: https://{account}.snowflakecomputing.com
    description: Snowflake SQL REST API — statements business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-statements
      path: /api/v2/statements
      operations:
      - name: submitstatement
        method: POST
        description: Submit a Sql Statement for Execution.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-statements-statementHandle
      path: /api/v2/statements/{statementHandle}
      operations:
      - name: getstatementstatus
        method: GET
        description: Check the Status of the Execution of a Statement.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v2-statements-statementHandle-cancel
      path: /api/v2/statements/{statementHandle}/cancel
      operations:
      - name: cancelstatement
        method: POST
        description: Cancel the Execution of a Statement.
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SNOWFLAKE_API_KEY}}'
  exposes:
  - type: rest
    namespace: sql-rest-statements-rest
    port: 8080
    description: REST adapter for Snowflake SQL REST API — statements. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v2/statements
      name: api-v2-statements
      description: REST surface for api-v2-statements.
      operations:
      - method: POST
        name: submitstatement
        description: Submit a Sql Statement for Execution.
        call: sql-rest-statements.submitstatement
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/statements/{statementhandle}
      name: api-v2-statements-statementhandle
      description: REST surface for api-v2-statements-statementHandle.
      operations:
      - method: GET
        name: getstatementstatus
        description: Check the Status of the Execution of a Statement.
        call: sql-rest-statements.getstatementstatus
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/statements/{statementhandle}/cancel
      name: api-v2-statements-statementhandle-cancel
      description: REST surface for api-v2-statements-statementHandle-cancel.
      operations:
      - method: POST
        name: cancelstatement
        description: Cancel the Execution of a Statement.
        call: sql-rest-statements.cancelstatement
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: sql-rest-statements-mcp
    port: 9090
    transport: http
    description: MCP adapter for Snowflake SQL REST API — statements. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: submit-sql-statement-execution
      description: Submit a Sql Statement for Execution.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: sql-rest-statements.submitstatement
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: check-status-execution-statement
      description: Check the Status of the Execution of a Statement.
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: sql-rest-statements.getstatementstatus
      outputParameters:
      - type: object
        mapping: $.
    - name: cancel-execution-statement
      description: Cancel the Execution of a Statement.
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: sql-rest-statements.cancelstatement
      outputParameters:
      - type: object
        mapping: $.