Google Cloud Spanner · Capability

Google Cloud Spanner API

The Cloud Spanner API provides programmatic access to Google Cloud Spanner, a globally distributed, strongly consistent relational database service. It enables management of instances, databases, sessions, and execution of SQL queries and DML statements with full ACID transaction support.

Run with Naftiko GoogleCloudSpannerAPI

What You Can Do

GET
Listinstances — Google Cloud Spanner List instances
/projects/{project}/instances
POST
Createinstance — Google Cloud Spanner Create an instance
/projects/{project}/instances
GET
Getinstance — Google Cloud Spanner Get an instance
/projects/{project}/instances/{instance}
PATCH
Updateinstance — Google Cloud Spanner Update an instance
/projects/{project}/instances/{instance}
DELETE
Deleteinstance — Google Cloud Spanner Delete an instance
/projects/{project}/instances/{instance}
GET
Listdatabases — Google Cloud Spanner List databases
/projects/{project}/instances/{instance}/databases
POST
Createdatabase — Google Cloud Spanner Create a database
/projects/{project}/instances/{instance}/databases
GET
Getdatabase — Google Cloud Spanner Get a database
/projects/{project}/instances/{instance}/databases/{database}
DELETE
Dropdatabase — Google Cloud Spanner Drop a database
/projects/{project}/instances/{instance}/databases/{database}
POST
Createsession — Google Cloud Spanner Create a session
/projects/{project}/instances/{instance}/databases/{database}/sessions

MCP Tools

listinstances

Google Cloud Spanner List instances

read-only idempotent
createinstance

Google Cloud Spanner Create an instance

getinstance

Google Cloud Spanner Get an instance

read-only idempotent
updateinstance

Google Cloud Spanner Update an instance

deleteinstance

Google Cloud Spanner Delete an instance

idempotent
listdatabases

Google Cloud Spanner List databases

read-only idempotent
createdatabase

Google Cloud Spanner Create a database

getdatabase

Google Cloud Spanner Get a database

read-only idempotent
dropdatabase

Google Cloud Spanner Drop a database

idempotent
createsession

Google Cloud Spanner Create a session

Capability Spec

google-cloud-spanner-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Cloud Spanner API
  description: The Cloud Spanner API provides programmatic access to Google Cloud Spanner, a globally distributed, strongly
    consistent relational database service. It enables management of instances, databases, sessions, and execution of SQL
    queries and DML statements with full ACID transaction support.
  tags:
  - Google
  - Cloud
  - Spanner
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: google-cloud-spanner
    baseUri: https://spanner.googleapis.com/v1
    description: Google Cloud Spanner API HTTP API.
    authentication:
      type: bearer
      token: '{{GOOGLE_CLOUD_SPANNER_TOKEN}}'
    resources:
    - name: projects-project-instances
      path: /projects/{project}/instances
      operations:
      - name: listinstances
        method: GET
        description: Google Cloud Spanner List instances
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: pageSize
          in: query
          type: integer
        - name: pageToken
          in: query
          type: string
        - name: filter
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createinstance
        method: POST
        description: Google Cloud Spanner Create an instance
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: projects-project-instances-instance
      path: /projects/{project}/instances/{instance}
      operations:
      - name: getinstance
        method: GET
        description: Google Cloud Spanner Get an instance
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateinstance
        method: PATCH
        description: Google Cloud Spanner Update an instance
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: deleteinstance
        method: DELETE
        description: Google Cloud Spanner Delete an instance
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: projects-project-instances-instance-databases
      path: /projects/{project}/instances/{instance}/databases
      operations:
      - name: listdatabases
        method: GET
        description: Google Cloud Spanner List databases
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        - name: pageSize
          in: query
          type: integer
        - name: pageToken
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createdatabase
        method: POST
        description: Google Cloud Spanner Create a database
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: projects-project-instances-instance-databases-da
      path: /projects/{project}/instances/{instance}/databases/{database}
      operations:
      - name: getdatabase
        method: GET
        description: Google Cloud Spanner Get a database
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        - name: database
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: dropdatabase
        method: DELETE
        description: Google Cloud Spanner Drop a database
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        - name: database
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: projects-project-instances-instance-databases-da
      path: /projects/{project}/instances/{instance}/databases/{database}/sessions
      operations:
      - name: createsession
        method: POST
        description: Google Cloud Spanner Create a session
        inputParameters:
        - name: project
          in: path
          type: string
          required: true
        - name: instance
          in: path
          type: string
          required: true
        - name: database
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: google-cloud-spanner-rest
    description: REST adapter for Google Cloud Spanner API.
    resources:
    - path: /projects/{project}/instances
      name: listinstances
      operations:
      - method: GET
        name: listinstances
        description: Google Cloud Spanner List instances
        call: google-cloud-spanner.listinstances
        with:
          project: rest.project
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances
      name: createinstance
      operations:
      - method: POST
        name: createinstance
        description: Google Cloud Spanner Create an instance
        call: google-cloud-spanner.createinstance
        with:
          project: rest.project
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}
      name: getinstance
      operations:
      - method: GET
        name: getinstance
        description: Google Cloud Spanner Get an instance
        call: google-cloud-spanner.getinstance
        with:
          project: rest.project
          instance: rest.instance
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}
      name: updateinstance
      operations:
      - method: PATCH
        name: updateinstance
        description: Google Cloud Spanner Update an instance
        call: google-cloud-spanner.updateinstance
        with:
          project: rest.project
          instance: rest.instance
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}
      name: deleteinstance
      operations:
      - method: DELETE
        name: deleteinstance
        description: Google Cloud Spanner Delete an instance
        call: google-cloud-spanner.deleteinstance
        with:
          project: rest.project
          instance: rest.instance
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}/databases
      name: listdatabases
      operations:
      - method: GET
        name: listdatabases
        description: Google Cloud Spanner List databases
        call: google-cloud-spanner.listdatabases
        with:
          project: rest.project
          instance: rest.instance
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}/databases
      name: createdatabase
      operations:
      - method: POST
        name: createdatabase
        description: Google Cloud Spanner Create a database
        call: google-cloud-spanner.createdatabase
        with:
          project: rest.project
          instance: rest.instance
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}/databases/{database}
      name: getdatabase
      operations:
      - method: GET
        name: getdatabase
        description: Google Cloud Spanner Get a database
        call: google-cloud-spanner.getdatabase
        with:
          project: rest.project
          instance: rest.instance
          database: rest.database
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}/databases/{database}
      name: dropdatabase
      operations:
      - method: DELETE
        name: dropdatabase
        description: Google Cloud Spanner Drop a database
        call: google-cloud-spanner.dropdatabase
        with:
          project: rest.project
          instance: rest.instance
          database: rest.database
        outputParameters:
        - type: object
          mapping: $.
    - path: /projects/{project}/instances/{instance}/databases/{database}/sessions
      name: createsession
      operations:
      - method: POST
        name: createsession
        description: Google Cloud Spanner Create a session
        call: google-cloud-spanner.createsession
        with:
          project: rest.project
          instance: rest.instance
          database: rest.database
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: google-cloud-spanner-mcp
    transport: http
    description: MCP adapter for Google Cloud Spanner API for AI agent use.
    tools:
    - name: listinstances
      description: Google Cloud Spanner List instances
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-cloud-spanner.listinstances
      with:
        project: tools.project
        pageSize: tools.pageSize
        pageToken: tools.pageToken
        filter: tools.filter
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: pageSize
        type: integer
        description: pageSize
      - name: pageToken
        type: string
        description: pageToken
      - name: filter
        type: string
        description: filter
      outputParameters:
      - type: object
        mapping: $.
    - name: createinstance
      description: Google Cloud Spanner Create an instance
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: google-cloud-spanner.createinstance
      with:
        project: tools.project
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: getinstance
      description: Google Cloud Spanner Get an instance
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-cloud-spanner.getinstance
      with:
        project: tools.project
        instance: tools.instance
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: updateinstance
      description: Google Cloud Spanner Update an instance
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: google-cloud-spanner.updateinstance
      with:
        project: tools.project
        instance: tools.instance
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: deleteinstance
      description: Google Cloud Spanner Delete an instance
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: google-cloud-spanner.deleteinstance
      with:
        project: tools.project
        instance: tools.instance
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: listdatabases
      description: Google Cloud Spanner List databases
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-cloud-spanner.listdatabases
      with:
        project: tools.project
        instance: tools.instance
        pageSize: tools.pageSize
        pageToken: tools.pageToken
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      - name: pageSize
        type: integer
        description: pageSize
      - name: pageToken
        type: string
        description: pageToken
      outputParameters:
      - type: object
        mapping: $.
    - name: createdatabase
      description: Google Cloud Spanner Create a database
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: google-cloud-spanner.createdatabase
      with:
        project: tools.project
        instance: tools.instance
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: getdatabase
      description: Google Cloud Spanner Get a database
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-cloud-spanner.getdatabase
      with:
        project: tools.project
        instance: tools.instance
        database: tools.database
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      - name: database
        type: string
        description: database
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: dropdatabase
      description: Google Cloud Spanner Drop a database
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: google-cloud-spanner.dropdatabase
      with:
        project: tools.project
        instance: tools.instance
        database: tools.database
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      - name: database
        type: string
        description: database
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: createsession
      description: Google Cloud Spanner Create a session
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: google-cloud-spanner.createsession
      with:
        project: tools.project
        instance: tools.instance
        database: tools.database
      inputParameters:
      - name: project
        type: string
        description: project
        required: true
      - name: instance
        type: string
        description: instance
        required: true
      - name: database
        type: string
        description: database
        required: true
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    GOOGLE_CLOUD_SPANNER_TOKEN: GOOGLE_CLOUD_SPANNER_TOKEN