Google · Capability

Google Gmail API — Labels

Google Gmail API — Labels. 6 operations. Lead operation: Google List Labels. Self-contained Naftiko capability covering one Google business surface.

Run with Naftiko GoogleLabels

What You Can Do

GET
Get — Google List Labels
/v1/gmail/v1/users/{userid}/labels
POST
Post — Google Create Labels
/v1/gmail/v1/users/{userid}/labels
GET
Get — Google Get Labels
/v1/gmail/v1/users/{userid}/labels/{id}
PUT
Put — Google Update Labels
/v1/gmail/v1/users/{userid}/labels/{id}
PATCH
Patch — Google Patch Labels
/v1/gmail/v1/users/{userid}/labels/{id}
DELETE
Delete — Google Delete Labels
/v1/gmail/v1/users/{userid}/labels/{id}

MCP Tools

google-list-labels

Google List Labels

read-only idempotent
google-create-labels

Google Create Labels

google-get-labels

Google Get Labels

read-only idempotent
google-update-labels

Google Update Labels

idempotent
google-patch-labels

Google Patch Labels

idempotent
google-delete-labels

Google Delete Labels

idempotent

Capability Spec

gmail-labels.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Gmail API — Labels
  description: 'Google Gmail API — Labels. 6 operations. Lead operation: Google List Labels. Self-contained Naftiko capability
    covering one Google business surface.'
  tags:
  - Google
  - Labels
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GOOGLE_API_KEY: GOOGLE_API_KEY
capability:
  consumes:
  - type: http
    namespace: gmail-labels
    baseUri: https://gmail.googleapis.com
    description: Google Gmail API — Labels business capability. Self-contained, no shared references.
    resources:
    - name: gmail-v1-users-userId-labels
      path: /gmail/v1/users/{userId}/labels
      operations:
      - name: get
        method: GET
        description: Google List Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Accept
          in: header
          type: string
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
      - name: post
        method: POST
        description: Google Create Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: gmail-v1-users-userId-labels-id
      path: /gmail/v1/users/{userId}/labels/{id}
      operations:
      - name: get
        method: GET
        description: Google Get Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Accept
          in: header
          type: string
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
        - name: id
          in: path
          type: string
          description: (Required)
          required: true
      - name: put
        method: PUT
        description: Google Update Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
        - name: id
          in: path
          type: string
          description: (Required)
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: patch
        method: PATCH
        description: Google Patch Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Content-Type
          in: header
          type: string
        - name: Accept
          in: header
          type: string
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
        - name: id
          in: path
          type: string
          description: (Required)
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: delete
        method: DELETE
        description: Google Delete Labels
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: userId
          in: path
          type: string
          description: (Required)
          required: true
        - name: id
          in: path
          type: string
          description: (Required)
          required: true
  exposes:
  - type: rest
    namespace: gmail-labels-rest
    port: 8080
    description: REST adapter for Google Gmail API — Labels. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/gmail/v1/users/{userid}/labels
      name: gmail-v1-users-userid-labels
      description: REST surface for gmail-v1-users-userId-labels.
      operations:
      - method: GET
        name: get
        description: Google List Labels
        call: gmail-labels.get
        with:
          Accept: rest.Accept
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Google Create Labels
        call: gmail-labels.post
        with:
          Content-Type: rest.Content-Type
          Accept: rest.Accept
          userId: rest.userId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/gmail/v1/users/{userid}/labels/{id}
      name: gmail-v1-users-userid-labels-id
      description: REST surface for gmail-v1-users-userId-labels-id.
      operations:
      - method: GET
        name: get
        description: Google Get Labels
        call: gmail-labels.get
        with:
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: put
        description: Google Update Labels
        call: gmail-labels.put
        with:
          Content-Type: rest.Content-Type
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: patch
        description: Google Patch Labels
        call: gmail-labels.patch
        with:
          Content-Type: rest.Content-Type
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Google Delete Labels
        call: gmail-labels.delete
        with:
          userId: rest.userId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gmail-labels-mcp
    port: 9090
    transport: http
    description: MCP adapter for Google Gmail API — Labels. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: google-list-labels
      description: Google List Labels
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gmail-labels.get
      with:
        Accept: tools.Accept
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.
    - name: google-create-labels
      description: Google Create Labels
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gmail-labels.post
      with:
        Content-Type: tools.Content-Type
        Accept: tools.Accept
        userId: tools.userId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-get-labels
      description: Google Get Labels
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gmail-labels.get
      with:
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: google-update-labels
      description: Google Update Labels
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gmail-labels.put
      with:
        Content-Type: tools.Content-Type
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-patch-labels
      description: Google Patch Labels
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: gmail-labels.patch
      with:
        Content-Type: tools.Content-Type
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-delete-labels
      description: Google Delete Labels
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gmail-labels.delete
      with:
        userId: tools.userId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.