SingleStore · Capability

SingleStore Database Operations

Unified database operations workflow combining SQL execution via the SingleStore Data API with workspace management via the Management API. Used by data engineers, application developers, and DevOps teams to manage database infrastructure and execute queries programmatically without native database drivers.

Run with Naftiko DatabaseSQLAnalyticsWorkspacesProvisioning

What You Can Do

POST
Execute sql — Execute DDL or DML SQL statements
/v1/sql/exec
POST
Query data — Execute SELECT queries and return results as rows
/v1/sql/query
GET
List workspace groups — List all workspace groups
/v1/workspace-groups
POST
Create workspace group — Create a workspace group
/v1/workspace-groups
GET
List workspaces — List workspaces
/v1/workspaces
POST
Create workspace — Create a workspace
/v1/workspaces
POST
Suspend workspace — Suspend a workspace to reduce costs
/v1/workspaces/{workspaceID}/suspend
POST
Resume workspace — Resume a suspended workspace
/v1/workspaces/{workspaceID}/resume
GET
List regions — List deployment regions
/v1/regions

MCP Tools

execute-sql

Execute a SQL DDL or DML statement against SingleStore (CREATE TABLE, INSERT, UPDATE, DELETE)

query-database

Execute a SELECT SQL query against SingleStore and return results

read-only
list-workspace-groups

List all SingleStore workspace groups in the organization

read-only
create-workspace-group

Create a new SingleStore workspace group in a specified region

list-workspaces

List all workspaces in the organization

read-only
create-workspace

Provision a new SingleStore workspace with specified compute size

get-workspace

Get details and connection information for a specific workspace

read-only
suspend-workspace

Suspend a running workspace to pause billing during idle periods

idempotent
resume-workspace

Resume a suspended workspace to restore database access

idempotent
list-regions

List available cloud regions for deploying SingleStore workspaces

read-only
list-jobs

List scheduled notebook automation jobs

read-only

APIs Used

singlestore-data singlestore-mgmt

Capability Spec

database-operations.yaml Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "SingleStore Database Operations"
  description: >-
    Unified database operations workflow combining SQL execution via the
    SingleStore Data API with workspace management via the Management API.
    Used by data engineers, application developers, and DevOps teams to
    manage database infrastructure and execute queries programmatically
    without native database drivers.
  tags:
    - Database
    - SQL
    - Analytics
    - Workspaces
    - Provisioning
  created: "2026-05-02"
  modified: "2026-05-02"

binds:
  - namespace: env
    keys:
      SINGLESTORE_API_KEY: SINGLESTORE_API_KEY
      SINGLESTORE_MANAGEMENT_API_KEY: SINGLESTORE_MANAGEMENT_API_KEY
      SINGLESTORE_WORKSPACE_HOST: SINGLESTORE_WORKSPACE_HOST

capability:
  consumes:
    - import: singlestore-data
      location: ./shared/data-api.yaml
    - import: singlestore-mgmt
      location: ./shared/management-api.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: database-operations-api
      description: "Unified REST API for SingleStore database and workspace management."
      resources:
        - path: /v1/sql/exec
          name: sql-exec
          description: Execute SQL statements
          operations:
            - method: POST
              name: execute-sql
              description: Execute DDL or DML SQL statements
              call: "singlestore-data.execute-sql"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/sql/query
          name: sql-query
          description: Query data with row results
          operations:
            - method: POST
              name: query-data
              description: Execute SELECT queries and return results as rows
              call: "singlestore-data.query-rows"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/workspace-groups
          name: workspace-groups
          description: Manage workspace groups
          operations:
            - method: GET
              name: list-workspace-groups
              description: List all workspace groups
              call: "singlestore-mgmt.list-workspace-groups"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: create-workspace-group
              description: Create a workspace group
              call: "singlestore-mgmt.create-workspace-group"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/workspaces
          name: workspaces
          description: Manage workspaces
          operations:
            - method: GET
              name: list-workspaces
              description: List workspaces
              call: "singlestore-mgmt.list-workspaces"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: POST
              name: create-workspace
              description: Create a workspace
              call: "singlestore-mgmt.create-workspace"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/workspaces/{workspaceID}/suspend
          name: workspace-suspend
          description: Suspend a workspace
          operations:
            - method: POST
              name: suspend-workspace
              description: Suspend a workspace to reduce costs
              call: "singlestore-mgmt.suspend-workspace"
              with:
                workspaceID: "rest.workspaceID"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/workspaces/{workspaceID}/resume
          name: workspace-resume
          description: Resume a workspace
          operations:
            - method: POST
              name: resume-workspace
              description: Resume a suspended workspace
              call: "singlestore-mgmt.resume-workspace"
              with:
                workspaceID: "rest.workspaceID"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/regions
          name: regions
          description: List available regions
          operations:
            - method: GET
              name: list-regions
              description: List deployment regions
              call: "singlestore-mgmt.list-regions"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9090
      namespace: database-operations-mcp
      transport: http
      description: "MCP server for AI-assisted SingleStore database operations and infrastructure management."
      tools:
        - name: execute-sql
          description: Execute a SQL DDL or DML statement against SingleStore (CREATE TABLE, INSERT, UPDATE, DELETE)
          hints:
            readOnly: false
            destructive: false
          call: "singlestore-data.execute-sql"
          with:
            sql: "tools.sql"
            database: "tools.database"
          outputParameters:
            - type: object
              mapping: "$."
        - name: query-database
          description: Execute a SELECT SQL query against SingleStore and return results
          hints:
            readOnly: true
            openWorld: true
          call: "singlestore-data.query-rows"
          with:
            sql: "tools.sql"
            database: "tools.database"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-workspace-groups
          description: List all SingleStore workspace groups in the organization
          hints:
            readOnly: true
            openWorld: false
          call: "singlestore-mgmt.list-workspace-groups"
          outputParameters:
            - type: object
              mapping: "$."
        - name: create-workspace-group
          description: Create a new SingleStore workspace group in a specified region
          hints:
            readOnly: false
            destructive: false
          call: "singlestore-mgmt.create-workspace-group"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-workspaces
          description: List all workspaces in the organization
          hints:
            readOnly: true
            openWorld: false
          call: "singlestore-mgmt.list-workspaces"
          outputParameters:
            - type: object
              mapping: "$."
        - name: create-workspace
          description: Provision a new SingleStore workspace with specified compute size
          hints:
            readOnly: false
            destructive: false
          call: "singlestore-mgmt.create-workspace"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-workspace
          description: Get details and connection information for a specific workspace
          hints:
            readOnly: true
            openWorld: false
          call: "singlestore-mgmt.get-workspace"
          with:
            workspaceID: "tools.workspaceID"
          outputParameters:
            - type: object
              mapping: "$."
        - name: suspend-workspace
          description: Suspend a running workspace to pause billing during idle periods
          hints:
            readOnly: false
            destructive: false
            idempotent: true
          call: "singlestore-mgmt.suspend-workspace"
          with:
            workspaceID: "tools.workspaceID"
          outputParameters:
            - type: object
              mapping: "$."
        - name: resume-workspace
          description: Resume a suspended workspace to restore database access
          hints:
            readOnly: false
            destructive: false
            idempotent: true
          call: "singlestore-mgmt.resume-workspace"
          with:
            workspaceID: "tools.workspaceID"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-regions
          description: List available cloud regions for deploying SingleStore workspaces
          hints:
            readOnly: true
            openWorld: false
          call: "singlestore-mgmt.list-regions"
          outputParameters:
            - type: object
              mapping: "$."
        - name: list-jobs
          description: List scheduled notebook automation jobs
          hints:
            readOnly: true
            openWorld: false
          call: "singlestore-mgmt.list-jobs"
          outputParameters:
            - type: object
              mapping: "$."