Label Studio · Capability

API Reference — subpackage_comments

API Reference — subpackage_comments. 6 operations. Lead operation: ✨ List comments. Self-contained Naftiko capability covering one Label Studio business surface.

Run with Naftiko Label Studiosubpackage_comments

What You Can Do

GET
List — ✨ List comments
/v1/api/comments
POST
Create — ✨ Create comment
/v1/api/comments
GET
Export — ✨ Export comments to CSV
/v1/api/comments/export
GET
Get — ✨ Get comment
/v1/api/comments/{id}
DELETE
Delete — ✨ Delete comment
/v1/api/comments/{id}
PATCH
Update — ✨ Update comment
/v1/api/comments/{id}

MCP Tools

list-comments

✨ List comments

read-only idempotent
create-comment

✨ Create comment

export-comments-csv

✨ Export comments to CSV

read-only idempotent
get-comment

✨ Get comment

read-only idempotent
delete-comment

✨ Delete comment

idempotent
update-comment

✨ Update comment

idempotent

Capability Spec

label-studio-subpackage-comments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_comments
  description: 'API Reference — subpackage_comments. 6 operations. Lead operation: ✨ List comments. Self-contained Naftiko
    capability covering one Label Studio business surface.'
  tags:
  - Label Studio
  - subpackage_comments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    LABEL_STUDIO_API_KEY: LABEL_STUDIO_API_KEY
capability:
  consumes:
  - type: http
    namespace: label-studio-subpackage-comments
    baseUri: http://localhost:8000
    description: API Reference — subpackage_comments business capability. Self-contained, no shared references.
    resources:
    - name: api-comments
      path: /api/comments/
      operations:
      - name: list
        method: GET
        description: ✨ List comments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation
          in: query
          type: integer
        - name: annotators
          in: query
          type: string
        - name: draft
          in: query
          type: integer
        - name: expand_created_by
          in: query
          type: boolean
        - name: ordering
          in: query
          type: string
          description: Which field to use when ordering the results.
        - name: projects
          in: query
          type: string
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
      - name: create
        method: POST
        description: ✨ Create comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: expand_created_by
          in: query
          type: boolean
          description: Expand the created_by field
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-comments-export
      path: /api/comments/export/
      operations:
      - name: export
        method: GET
        description: ✨ Export comments to CSV
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: annotation
          in: query
          type: integer
        - name: annotators
          in: query
          type: string
        - name: draft
          in: query
          type: integer
        - name: expand_created_by
          in: query
          type: boolean
        - name: projects
          in: query
          type: string
        - name: tz
          in: query
          type: string
          description: Timezone in which to export the data. Format IANA timezone name, e.g. "America/New_York"
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
    - name: api-comments-id
      path: /api/comments/{id}/
      operations:
      - name: get
        method: GET
        description: ✨ Get comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: expand_created_by
          in: query
          type: boolean
          description: Expand the created_by field
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
      - name: delete
        method: DELETE
        description: ✨ Delete comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: expand_created_by
          in: query
          type: boolean
          description: Expand the created_by field
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
      - name: update
        method: PATCH
        description: ✨ Update comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: expand_created_by
          in: query
          type: boolean
          description: Expand the created_by field
        - name: Authorization
          in: header
          type: string
          description: 'The token (or API key) must be passed as a request header. You can find your user token on the User
            Account page in Label Studio. Example: <br><pre><code class='
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.LABEL_STUDIO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: label-studio-subpackage-comments-rest
    port: 8080
    description: REST adapter for API Reference — subpackage_comments. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/comments
      name: api-comments
      description: REST surface for api-comments.
      operations:
      - method: GET
        name: list
        description: ✨ List comments
        call: label-studio-subpackage-comments.list
        with:
          annotation: rest.annotation
          annotators: rest.annotators
          draft: rest.draft
          expand_created_by: rest.expand_created_by
          ordering: rest.ordering
          projects: rest.projects
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: create
        description: ✨ Create comment
        call: label-studio-subpackage-comments.create
        with:
          expand_created_by: rest.expand_created_by
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/comments/export
      name: api-comments-export
      description: REST surface for api-comments-export.
      operations:
      - method: GET
        name: export
        description: ✨ Export comments to CSV
        call: label-studio-subpackage-comments.export
        with:
          annotation: rest.annotation
          annotators: rest.annotators
          draft: rest.draft
          expand_created_by: rest.expand_created_by
          projects: rest.projects
          tz: rest.tz
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/comments/{id}
      name: api-comments-id
      description: REST surface for api-comments-id.
      operations:
      - method: GET
        name: get
        description: ✨ Get comment
        call: label-studio-subpackage-comments.get
        with:
          id: rest.id
          expand_created_by: rest.expand_created_by
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: ✨ Delete comment
        call: label-studio-subpackage-comments.delete
        with:
          id: rest.id
          expand_created_by: rest.expand_created_by
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: update
        description: ✨ Update comment
        call: label-studio-subpackage-comments.update
        with:
          id: rest.id
          expand_created_by: rest.expand_created_by
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: label-studio-subpackage-comments-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Reference — subpackage_comments. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-comments
      description: ✨ List comments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-comments.list
      with:
        annotation: tools.annotation
        annotators: tools.annotators
        draft: tools.draft
        expand_created_by: tools.expand_created_by
        ordering: tools.ordering
        projects: tools.projects
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: create-comment
      description: ✨ Create comment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-comments.create
      with:
        expand_created_by: tools.expand_created_by
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: export-comments-csv
      description: ✨ Export comments to CSV
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-comments.export
      with:
        annotation: tools.annotation
        annotators: tools.annotators
        draft: tools.draft
        expand_created_by: tools.expand_created_by
        projects: tools.projects
        tz: tools.tz
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: get-comment
      description: ✨ Get comment
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-comments.get
      with:
        id: tools.id
        expand_created_by: tools.expand_created_by
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-comment
      description: ✨ Delete comment
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-comments.delete
      with:
        id: tools.id
        expand_created_by: tools.expand_created_by
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: update-comment
      description: ✨ Update comment
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: label-studio-subpackage-comments.update
      with:
        id: tools.id
        expand_created_by: tools.expand_created_by
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.