Google · Capability

Google Gmail API — Threads

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

Run with Naftiko GoogleThreads

What You Can Do

GET
Get — Google List Threads
/v1/gmail/v1/users/{userid}/threads
GET
Get — Google Get Threads
/v1/gmail/v1/users/{userid}/threads/{id}
DELETE
Delete — Google Delete Threads
/v1/gmail/v1/users/{userid}/threads/{id}
POST
Post — Google Modify Threads
/v1/gmail/v1/users/{userid}/threads/{id}/modify
POST
Post — Google Trash Threads
/v1/gmail/v1/users/{userid}/threads/{id}/trash

MCP Tools

google-list-threads

Google List Threads

read-only idempotent
google-get-threads

Google Get Threads

read-only idempotent
google-delete-threads

Google Delete Threads

idempotent
google-modify-threads

Google Modify Threads

google-trash-threads

Google Trash Threads

Capability Spec

gmail-threads.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google Gmail API — Threads
  description: 'Google Gmail API — Threads. 5 operations. Lead operation: Google List Threads. Self-contained Naftiko capability
    covering one Google business surface.'
  tags:
  - Google
  - Threads
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GOOGLE_API_KEY: GOOGLE_API_KEY
capability:
  consumes:
  - type: http
    namespace: gmail-threads
    baseUri: https://gmail.googleapis.com
    description: Google Gmail API — Threads business capability. Self-contained, no shared references.
    resources:
    - name: gmail-v1-users-userId-threads
      path: /gmail/v1/users/{userId}/threads
      operations:
      - name: get
        method: GET
        description: Google List Threads
        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: gmail-v1-users-userId-threads-id
      path: /gmail/v1/users/{userId}/threads/{id}
      operations:
      - name: get
        method: GET
        description: Google Get Threads
        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: delete
        method: DELETE
        description: Google Delete Threads
        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
    - name: gmail-v1-users-userId-threads-id-modify
      path: /gmail/v1/users/{userId}/threads/{id}/modify
      operations:
      - name: post
        method: POST
        description: Google Modify Threads
        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: gmail-v1-users-userId-threads-id-trash
      path: /gmail/v1/users/{userId}/threads/{id}/trash
      operations:
      - name: post
        method: POST
        description: Google Trash Threads
        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: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
  exposes:
  - type: rest
    namespace: gmail-threads-rest
    port: 8080
    description: REST adapter for Google Gmail API — Threads. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/gmail/v1/users/{userid}/threads
      name: gmail-v1-users-userid-threads
      description: REST surface for gmail-v1-users-userId-threads.
      operations:
      - method: GET
        name: get
        description: Google List Threads
        call: gmail-threads.get
        with:
          Accept: rest.Accept
          userId: rest.userId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/gmail/v1/users/{userid}/threads/{id}
      name: gmail-v1-users-userid-threads-id
      description: REST surface for gmail-v1-users-userId-threads-id.
      operations:
      - method: GET
        name: get
        description: Google Get Threads
        call: gmail-threads.get
        with:
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Google Delete Threads
        call: gmail-threads.delete
        with:
          userId: rest.userId
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/gmail/v1/users/{userid}/threads/{id}/modify
      name: gmail-v1-users-userid-threads-id-modify
      description: REST surface for gmail-v1-users-userId-threads-id-modify.
      operations:
      - method: POST
        name: post
        description: Google Modify Threads
        call: gmail-threads.post
        with:
          Content-Type: rest.Content-Type
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/gmail/v1/users/{userid}/threads/{id}/trash
      name: gmail-v1-users-userid-threads-id-trash
      description: REST surface for gmail-v1-users-userId-threads-id-trash.
      operations:
      - method: POST
        name: post
        description: Google Trash Threads
        call: gmail-threads.post
        with:
          Accept: rest.Accept
          userId: rest.userId
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gmail-threads-mcp
    port: 9090
    transport: http
    description: MCP adapter for Google Gmail API — Threads. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: google-list-threads
      description: Google List Threads
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gmail-threads.get
      with:
        Accept: tools.Accept
        userId: tools.userId
      outputParameters:
      - type: object
        mapping: $.
    - name: google-get-threads
      description: Google Get Threads
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gmail-threads.get
      with:
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: google-delete-threads
      description: Google Delete Threads
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gmail-threads.delete
      with:
        userId: tools.userId
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: google-modify-threads
      description: Google Modify Threads
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gmail-threads.post
      with:
        Content-Type: tools.Content-Type
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: google-trash-threads
      description: Google Trash Threads
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gmail-threads.post
      with:
        Accept: tools.Accept
        userId: tools.userId
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.