Snowflake · Capability

Snowflake Database Role API — database-role

Snowflake Database Role API — database-role. 10 operations. Lead operation: List Database Roles. Self-contained Naftiko capability covering one Snowflake business surface.

Run with Naftiko Snowflakedatabase-role

What You Can Do

GET
Listdatabaseroles — List Database Roles
/v1/api/v2/databases/{database}/database-roles
POST
Createdatabaserole — Create a Database Role
/v1/api/v2/databases/{database}/database-roles
DELETE
Deletedatabaserole — Delete a Database Role
/v1/api/v2/databases/{database}/database-roles/{name}
GET
Listfuturegrants — List All Future Grants to the Role
/v1/api/v2/databases/{database}/database-roles/{name}/future-grants
POST
Grantfutureprivileges — Grant Future Privileges to the Role
/v1/api/v2/databases/{database}/database-roles/{name}/future-grants
POST
Revokefuturegrants — Revoke Future Grants From the Role
/v1/api/v2/databases/{database}/database-roles/{name}/future-grants-revoke
GET
Listgrants — List All Grants to the Role
/v1/api/v2/databases/{database}/database-roles/{name}/grants
POST
Grantprivileges — Grant Privileges to the Role
/v1/api/v2/databases/{database}/database-roles/{name}/grants
POST
Revokegrants — Revoke Grants From the Role
/v1/api/v2/databases/{database}/database-roles/{name}/grants-revoke
POST
Clonedatabaserole — Create a New Database Role by Cloning From the Specified Resource
/v1/api/v2/databases/{database}/database-roles/name-clone

MCP Tools

list-database-roles

List Database Roles

read-only idempotent
create-database-role

Create a Database Role

delete-database-role

Delete a Database Role

idempotent
list-all-future-grants-role

List All Future Grants to the Role

read-only idempotent
grant-future-privileges-role

Grant Future Privileges to the Role

revoke-future-grants-role

Revoke Future Grants From the Role

list-all-grants-role

List All Grants to the Role

read-only idempotent
grant-privileges-role

Grant Privileges to the Role

revoke-grants-role

Revoke Grants From the Role

create-new-database-role-cloning

Create a New Database Role by Cloning From the Specified Resource

Capability Spec

database-role-database-role.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Snowflake Database Role API — database-role
  description: 'Snowflake Database Role API — database-role. 10 operations. Lead operation: List Database Roles. Self-contained
    Naftiko capability covering one Snowflake business surface.'
  tags:
  - Snowflake
  - database-role
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SNOWFLAKE_API_KEY: SNOWFLAKE_API_KEY
capability:
  consumes:
  - type: http
    namespace: database-role-database-role
    baseUri: https://org-account.snowflakecomputing.com
    description: Snowflake Database Role API — database-role business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-databases-database-database-roles
      path: /api/v2/databases/{database}/database-roles
      operations:
      - name: listdatabaseroles
        method: GET
        description: List Database Roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createdatabaserole
        method: POST
        description: Create a Database Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-databases-database-database-roles-name
      path: /api/v2/databases/{database}/database-roles/{name}
      operations:
      - name: deletedatabaserole
        method: DELETE
        description: Delete a Database Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: api-v2-databases-database-database-roles-name-future-grants
      path: /api/v2/databases/{database}/database-roles/{name}/future-grants
      operations:
      - name: listfuturegrants
        method: GET
        description: List All Future Grants to the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: grantfutureprivileges
        method: POST
        description: Grant Future Privileges to the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-databases-database-database-roles-name-future-grants:revoke
      path: /api/v2/databases/{database}/database-roles/{name}/future-grants:revoke
      operations:
      - name: revokefuturegrants
        method: POST
        description: Revoke Future Grants From the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-databases-database-database-roles-name-grants
      path: /api/v2/databases/{database}/database-roles/{name}/grants
      operations:
      - name: listgrants
        method: GET
        description: List All Grants to the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: grantprivileges
        method: POST
        description: Grant Privileges to the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-databases-database-database-roles-name-grants:revoke
      path: /api/v2/databases/{database}/database-roles/{name}/grants:revoke
      operations:
      - name: revokegrants
        method: POST
        description: Revoke Grants From the Role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-v2-databases-database-database-roles-name}:clone
      path: /api/v2/databases/{database}/database-roles/{name}:clone
      operations:
      - name: clonedatabaserole
        method: POST
        description: Create a New Database Role by Cloning From the Specified Resource
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: targetDatabase
          in: query
          type: string
          description: Database of the target resource. Defaults to the source's database
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
  exposes:
  - type: rest
    namespace: database-role-database-role-rest
    port: 8080
    description: REST adapter for Snowflake Database Role API — database-role. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/api/v2/databases/{database}/database-roles
      name: api-v2-databases-database-database-roles
      description: REST surface for api-v2-databases-database-database-roles.
      operations:
      - method: GET
        name: listdatabaseroles
        description: List Database Roles
        call: database-role-database-role.listdatabaseroles
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createdatabaserole
        description: Create a Database Role
        call: database-role-database-role.createdatabaserole
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/{name}
      name: api-v2-databases-database-database-roles-name
      description: REST surface for api-v2-databases-database-database-roles-name.
      operations:
      - method: DELETE
        name: deletedatabaserole
        description: Delete a Database Role
        call: database-role-database-role.deletedatabaserole
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/{name}/future-grants
      name: api-v2-databases-database-database-roles-name-future-grants
      description: REST surface for api-v2-databases-database-database-roles-name-future-grants.
      operations:
      - method: GET
        name: listfuturegrants
        description: List All Future Grants to the Role
        call: database-role-database-role.listfuturegrants
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: grantfutureprivileges
        description: Grant Future Privileges to the Role
        call: database-role-database-role.grantfutureprivileges
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/{name}/future-grants-revoke
      name: api-v2-databases-database-database-roles-name-future-grants-revoke
      description: REST surface for api-v2-databases-database-database-roles-name-future-grants:revoke.
      operations:
      - method: POST
        name: revokefuturegrants
        description: Revoke Future Grants From the Role
        call: database-role-database-role.revokefuturegrants
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/{name}/grants
      name: api-v2-databases-database-database-roles-name-grants
      description: REST surface for api-v2-databases-database-database-roles-name-grants.
      operations:
      - method: GET
        name: listgrants
        description: List All Grants to the Role
        call: database-role-database-role.listgrants
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: grantprivileges
        description: Grant Privileges to the Role
        call: database-role-database-role.grantprivileges
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/{name}/grants-revoke
      name: api-v2-databases-database-database-roles-name-grants-revoke
      description: REST surface for api-v2-databases-database-database-roles-name-grants:revoke.
      operations:
      - method: POST
        name: revokegrants
        description: Revoke Grants From the Role
        call: database-role-database-role.revokegrants
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/databases/{database}/database-roles/name-clone
      name: api-v2-databases-database-database-roles-name-clone
      description: REST surface for api-v2-databases-database-database-roles-name}:clone.
      operations:
      - method: POST
        name: clonedatabaserole
        description: Create a New Database Role by Cloning From the Specified Resource
        call: database-role-database-role.clonedatabaserole
        with:
          targetDatabase: rest.targetDatabase
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: database-role-database-role-mcp
    port: 9090
    transport: http
    description: MCP adapter for Snowflake Database Role API — database-role. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-database-roles
      description: List Database Roles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: database-role-database-role.listdatabaseroles
      outputParameters:
      - type: object
        mapping: $.
    - name: create-database-role
      description: Create a Database Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.createdatabaserole
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-database-role
      description: Delete a Database Role
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: database-role-database-role.deletedatabaserole
      outputParameters:
      - type: object
        mapping: $.
    - name: list-all-future-grants-role
      description: List All Future Grants to the Role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: database-role-database-role.listfuturegrants
      outputParameters:
      - type: object
        mapping: $.
    - name: grant-future-privileges-role
      description: Grant Future Privileges to the Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.grantfutureprivileges
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: revoke-future-grants-role
      description: Revoke Future Grants From the Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.revokefuturegrants
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-all-grants-role
      description: List All Grants to the Role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: database-role-database-role.listgrants
      outputParameters:
      - type: object
        mapping: $.
    - name: grant-privileges-role
      description: Grant Privileges to the Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.grantprivileges
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: revoke-grants-role
      description: Revoke Grants From the Role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.revokegrants
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-database-role-cloning
      description: Create a New Database Role by Cloning From the Specified Resource
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: database-role-database-role.clonedatabaserole
      with:
        targetDatabase: tools.targetDatabase
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.