Google Cloud Storage · Capability

Google Cloud Storage JSON API — Buckets

Google Cloud Storage JSON API — Buckets. 10 operations. Lead operation: Google Cloud Storage List Buckets. Self-contained Naftiko capability covering one Gcp Cloud Storage business surface.

Run with Naftiko Gcp Cloud StorageBuckets

What You Can Do

GET
Listbuckets — Google Cloud Storage List Buckets
/v1/b
POST
Insertbucket — Google Cloud Storage Create a Bucket
/v1/b
GET
Getbucket — Google Cloud Storage Get a Bucket
/v1/b/{bucket}
PUT
Updatebucket — Google Cloud Storage Update a Bucket
/v1/b/{bucket}
PATCH
Patchbucket — Google Cloud Storage Patch a Bucket
/v1/b/{bucket}
DELETE
Deletebucket — Google Cloud Storage Delete a Bucket
/v1/b/{bucket}
GET
Getbucketiampolicy — Google Cloud Storage Get Bucket Iam Policy
/v1/b/{bucket}/iam
PUT
Setbucketiampolicy — Google Cloud Storage Set Bucket Iam Policy
/v1/b/{bucket}/iam
GET
Testbucketiampermissions — Google Cloud Storage Test Bucket Iam Permissions
/v1/b/{bucket}/iam/testpermissions
POST
Lockbucketretentionpolicy — Google Cloud Storage Lock Retention Policy
/v1/b/{bucket}/lockretentionpolicy

MCP Tools

google-cloud-storage-list-buckets

Google Cloud Storage List Buckets

read-only idempotent
google-cloud-storage-create-bucket

Google Cloud Storage Create a Bucket

google-cloud-storage-get-bucket

Google Cloud Storage Get a Bucket

read-only idempotent
google-cloud-storage-update-bucket

Google Cloud Storage Update a Bucket

idempotent
google-cloud-storage-patch-bucket

Google Cloud Storage Patch a Bucket

idempotent
google-cloud-storage-delete-bucket

Google Cloud Storage Delete a Bucket

idempotent
google-cloud-storage-get-bucket-2

Google Cloud Storage Get Bucket Iam Policy

read-only idempotent
google-cloud-storage-set-bucket

Google Cloud Storage Set Bucket Iam Policy

idempotent
google-cloud-storage-test-bucket

Google Cloud Storage Test Bucket Iam Permissions

read-only idempotent
google-cloud-storage-lock-retention

Google Cloud Storage Lock Retention Policy

Capability Spec

json-buckets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Cloud Storage JSON API — Buckets
  description: 'Google Cloud Storage JSON API — Buckets. 10 operations. Lead operation: Google Cloud Storage List Buckets.
    Self-contained Naftiko capability covering one Gcp Cloud Storage business surface.'
  tags:
  - Gcp Cloud Storage
  - Buckets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GCP_CLOUD_STORAGE_API_KEY: GCP_CLOUD_STORAGE_API_KEY
capability:
  consumes:
  - type: http
    namespace: json-buckets
    baseUri: https://storage.googleapis.com/storage/v1
    description: Google Cloud Storage JSON API — Buckets business capability. Self-contained, no shared references.
    resources:
    - name: b
      path: /b
      operations:
      - name: listbuckets
        method: GET
        description: Google Cloud Storage List Buckets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: project
          in: query
          type: string
          description: The project ID or project number to list buckets for.
          required: true
        - name: maxResults
          in: query
          type: integer
          description: Maximum number of buckets to return in a single response. The service uses this value or 1,000 items,
            whichever is smaller.
        - name: pageToken
          in: query
          type: string
          description: A previously-returned page token representing part of the larger set of results to view. The pageToken
            is an encoded field that marks the name and generation of
        - name: prefix
          in: query
          type: string
          description: Filter results to buckets whose names begin with this prefix.
        - name: projection
          in: query
          type: string
          description: Set of properties to return. Defaults to noAcl.
      - name: insertbucket
        method: POST
        description: Google Cloud Storage Create a Bucket
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: project
          in: query
          type: string
          description: The project ID or project number to create the bucket in.
          required: true
        - name: predefinedAcl
          in: query
          type: string
          description: Apply a predefined set of access controls to the bucket.
        - name: predefinedDefaultObjectAcl
          in: query
          type: string
          description: Apply a predefined set of default object access controls to the bucket.
        - name: projection
          in: query
          type: string
          description: Set of properties to return. Defaults to noAcl.
        - name: enableObjectRetention
          in: query
          type: boolean
          description: When set to true, object retention is enabled for this bucket.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: b-bucket
      path: /b/{bucket}
      operations:
      - name: getbucket
        method: GET
        description: Google Cloud Storage Get a Bucket
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ifMetagenerationMatch
          in: query
          type: integer
          description: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration
            matches the given value.
        - name: ifMetagenerationNotMatch
          in: query
          type: integer
          description: Makes the return of the bucket metadata conditional on whether the bucket's current metageneration
            does not match the given value.
        - name: projection
          in: query
          type: string
          description: Set of properties to return. Defaults to noAcl.
      - name: updatebucket
        method: PUT
        description: Google Cloud Storage Update a Bucket
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ifMetagenerationMatch
          in: query
          type: integer
          description: Makes the update conditional on whether the bucket's current metageneration matches the given value.
        - name: ifMetagenerationNotMatch
          in: query
          type: integer
          description: Makes the update conditional on whether the bucket's current metageneration does not match the given
            value.
        - name: predefinedAcl
          in: query
          type: string
          description: Apply a predefined set of access controls to the bucket.
        - name: predefinedDefaultObjectAcl
          in: query
          type: string
          description: Apply a predefined set of default object access controls.
        - name: projection
          in: query
          type: string
          description: Set of properties to return. Defaults to full.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: patchbucket
        method: PATCH
        description: Google Cloud Storage Patch a Bucket
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ifMetagenerationMatch
          in: query
          type: integer
          description: Makes the patch conditional on whether the bucket's current metageneration matches the given value.
        - name: ifMetagenerationNotMatch
          in: query
          type: integer
          description: Makes the patch conditional on whether the bucket's current metageneration does not match the given
            value.
        - name: predefinedAcl
          in: query
          type: string
          description: Apply a predefined set of access controls to the bucket.
        - name: predefinedDefaultObjectAcl
          in: query
          type: string
          description: Apply a predefined set of default object access controls.
        - name: projection
          in: query
          type: string
          description: Set of properties to return. Defaults to full.
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deletebucket
        method: DELETE
        description: Google Cloud Storage Delete a Bucket
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ifMetagenerationMatch
          in: query
          type: integer
          description: Makes the deletion conditional on whether the bucket's current metageneration matches the given value.
        - name: ifMetagenerationNotMatch
          in: query
          type: integer
          description: Makes the deletion conditional on whether the bucket's current metageneration does not match the given
            value.
    - name: b-bucket-iam
      path: /b/{bucket}/iam
      operations:
      - name: getbucketiampolicy
        method: GET
        description: Google Cloud Storage Get Bucket Iam Policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: optionsRequestedPolicyVersion
          in: query
          type: integer
          description: The IAM policy format version to be returned. Valid values are 1 and 3. Requests specifying an invalid
            value will be rejected. Defaults to 1.
      - name: setbucketiampolicy
        method: PUT
        description: Google Cloud Storage Set Bucket Iam Policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: b-bucket-iam-testPermissions
      path: /b/{bucket}/iam/testPermissions
      operations:
      - name: testbucketiampermissions
        method: GET
        description: Google Cloud Storage Test Bucket Iam Permissions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: permissions
          in: query
          type: array
          description: Permissions to test.
          required: true
    - name: b-bucket-lockRetentionPolicy
      path: /b/{bucket}/lockRetentionPolicy
      operations:
      - name: lockbucketretentionpolicy
        method: POST
        description: Google Cloud Storage Lock Retention Policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ifMetagenerationMatch
          in: query
          type: integer
          description: Makes the operation conditional on whether the bucket's current metageneration matches the given value.
          required: true
    authentication:
      type: bearer
      token: '{{env.GCP_CLOUD_STORAGE_API_KEY}}'
  exposes:
  - type: rest
    namespace: json-buckets-rest
    port: 8080
    description: REST adapter for Google Cloud Storage JSON API — Buckets. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/b
      name: b
      description: REST surface for b.
      operations:
      - method: GET
        name: listbuckets
        description: Google Cloud Storage List Buckets
        call: json-buckets.listbuckets
        with:
          project: rest.project
          maxResults: rest.maxResults
          pageToken: rest.pageToken
          prefix: rest.prefix
          projection: rest.projection
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: insertbucket
        description: Google Cloud Storage Create a Bucket
        call: json-buckets.insertbucket
        with:
          project: rest.project
          predefinedAcl: rest.predefinedAcl
          predefinedDefaultObjectAcl: rest.predefinedDefaultObjectAcl
          projection: rest.projection
          enableObjectRetention: rest.enableObjectRetention
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/b/{bucket}
      name: b-bucket
      description: REST surface for b-bucket.
      operations:
      - method: GET
        name: getbucket
        description: Google Cloud Storage Get a Bucket
        call: json-buckets.getbucket
        with:
          ifMetagenerationMatch: rest.ifMetagenerationMatch
          ifMetagenerationNotMatch: rest.ifMetagenerationNotMatch
          projection: rest.projection
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updatebucket
        description: Google Cloud Storage Update a Bucket
        call: json-buckets.updatebucket
        with:
          ifMetagenerationMatch: rest.ifMetagenerationMatch
          ifMetagenerationNotMatch: rest.ifMetagenerationNotMatch
          predefinedAcl: rest.predefinedAcl
          predefinedDefaultObjectAcl: rest.predefinedDefaultObjectAcl
          projection: rest.projection
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patchbucket
        description: Google Cloud Storage Patch a Bucket
        call: json-buckets.patchbucket
        with:
          ifMetagenerationMatch: rest.ifMetagenerationMatch
          ifMetagenerationNotMatch: rest.ifMetagenerationNotMatch
          predefinedAcl: rest.predefinedAcl
          predefinedDefaultObjectAcl: rest.predefinedDefaultObjectAcl
          projection: rest.projection
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletebucket
        description: Google Cloud Storage Delete a Bucket
        call: json-buckets.deletebucket
        with:
          ifMetagenerationMatch: rest.ifMetagenerationMatch
          ifMetagenerationNotMatch: rest.ifMetagenerationNotMatch
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/b/{bucket}/iam
      name: b-bucket-iam
      description: REST surface for b-bucket-iam.
      operations:
      - method: GET
        name: getbucketiampolicy
        description: Google Cloud Storage Get Bucket Iam Policy
        call: json-buckets.getbucketiampolicy
        with:
          optionsRequestedPolicyVersion: rest.optionsRequestedPolicyVersion
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: setbucketiampolicy
        description: Google Cloud Storage Set Bucket Iam Policy
        call: json-buckets.setbucketiampolicy
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/b/{bucket}/iam/testpermissions
      name: b-bucket-iam-testpermissions
      description: REST surface for b-bucket-iam-testPermissions.
      operations:
      - method: GET
        name: testbucketiampermissions
        description: Google Cloud Storage Test Bucket Iam Permissions
        call: json-buckets.testbucketiampermissions
        with:
          permissions: rest.permissions
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/b/{bucket}/lockretentionpolicy
      name: b-bucket-lockretentionpolicy
      description: REST surface for b-bucket-lockRetentionPolicy.
      operations:
      - method: POST
        name: lockbucketretentionpolicy
        description: Google Cloud Storage Lock Retention Policy
        call: json-buckets.lockbucketretentionpolicy
        with:
          ifMetagenerationMatch: rest.ifMetagenerationMatch
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: json-buckets-mcp
    port: 9090
    transport: http
    description: MCP adapter for Google Cloud Storage JSON API — Buckets. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: google-cloud-storage-list-buckets
      description: Google Cloud Storage List Buckets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: json-buckets.listbuckets
      with:
        project: tools.project
        maxResults: tools.maxResults
        pageToken: tools.pageToken
        prefix: tools.prefix
        projection: tools.projection
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-create-bucket
      description: Google Cloud Storage Create a Bucket
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: json-buckets.insertbucket
      with:
        project: tools.project
        predefinedAcl: tools.predefinedAcl
        predefinedDefaultObjectAcl: tools.predefinedDefaultObjectAcl
        projection: tools.projection
        enableObjectRetention: tools.enableObjectRetention
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-get-bucket
      description: Google Cloud Storage Get a Bucket
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: json-buckets.getbucket
      with:
        ifMetagenerationMatch: tools.ifMetagenerationMatch
        ifMetagenerationNotMatch: tools.ifMetagenerationNotMatch
        projection: tools.projection
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-update-bucket
      description: Google Cloud Storage Update a Bucket
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: json-buckets.updatebucket
      with:
        ifMetagenerationMatch: tools.ifMetagenerationMatch
        ifMetagenerationNotMatch: tools.ifMetagenerationNotMatch
        predefinedAcl: tools.predefinedAcl
        predefinedDefaultObjectAcl: tools.predefinedDefaultObjectAcl
        projection: tools.projection
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-patch-bucket
      description: Google Cloud Storage Patch a Bucket
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: json-buckets.patchbucket
      with:
        ifMetagenerationMatch: tools.ifMetagenerationMatch
        ifMetagenerationNotMatch: tools.ifMetagenerationNotMatch
        predefinedAcl: tools.predefinedAcl
        predefinedDefaultObjectAcl: tools.predefinedDefaultObjectAcl
        projection: tools.projection
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-delete-bucket
      description: Google Cloud Storage Delete a Bucket
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: json-buckets.deletebucket
      with:
        ifMetagenerationMatch: tools.ifMetagenerationMatch
        ifMetagenerationNotMatch: tools.ifMetagenerationNotMatch
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-get-bucket-2
      description: Google Cloud Storage Get Bucket Iam Policy
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: json-buckets.getbucketiampolicy
      with:
        optionsRequestedPolicyVersion: tools.optionsRequestedPolicyVersion
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-set-bucket
      description: Google Cloud Storage Set Bucket Iam Policy
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: json-buckets.setbucketiampolicy
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-test-bucket
      description: Google Cloud Storage Test Bucket Iam Permissions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: json-buckets.testbucketiampermissions
      with:
        permissions: tools.permissions
      outputParameters:
      - type: object
        mapping: $.
    - name: google-cloud-storage-lock-retention
      description: Google Cloud Storage Lock Retention Policy
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: json-buckets.lockbucketretentionpolicy
      with:
        ifMetagenerationMatch: tools.ifMetagenerationMatch
      outputParameters:
      - type: object
        mapping: $.