dev-to · Capability

Dev.to Forem API — Comments

Dev.to Forem API — Comments. 2 operations. Lead operation: Comments. Self-contained Naftiko capability covering one Dev To business surface.

Run with Naftiko Dev ToComments

What You Can Do

GET
Getcommentsbyarticleid — Comments
/v1/comments
GET
Getcommentbyid — Comment by id
/v1/comments/{id}

MCP Tools

comments

Comments

read-only idempotent
comment-id

Comment by id

read-only idempotent

Capability Spec

forem-comments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Dev.to Forem API — Comments
  description: 'Dev.to Forem API — Comments. 2 operations. Lead operation: Comments. Self-contained Naftiko capability covering
    one Dev To business surface.'
  tags:
  - Dev To
  - Comments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DEV_TO_API_KEY: DEV_TO_API_KEY
capability:
  consumes:
  - type: http
    namespace: forem-comments
    baseUri: https://dev.to/api
    description: Dev.to Forem API — Comments business capability. Self-contained, no shared references.
    resources:
    - name: comments
      path: /comments
      operations:
      - name: getcommentsbyarticleid
        method: GET
        description: Comments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: a_id
          in: query
          type: integer
          description: The article ID to retrieve comments for.
        - name: p_id
          in: query
          type: integer
          description: The podcast episode ID to retrieve comments for.
    - name: comments-id
      path: /comments/{id}
      operations:
      - name: getcommentbyid
        method: GET
        description: Comment by id
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the comment.
          required: true
    authentication:
      type: apikey
      key: api-key
      value: '{{env.DEV_TO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: forem-comments-rest
    port: 8080
    description: REST adapter for Dev.to Forem API — Comments. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/comments
      name: comments
      description: REST surface for comments.
      operations:
      - method: GET
        name: getcommentsbyarticleid
        description: Comments
        call: forem-comments.getcommentsbyarticleid
        with:
          a_id: rest.a_id
          p_id: rest.p_id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/comments/{id}
      name: comments-id
      description: REST surface for comments-id.
      operations:
      - method: GET
        name: getcommentbyid
        description: Comment by id
        call: forem-comments.getcommentbyid
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: forem-comments-mcp
    port: 9090
    transport: http
    description: MCP adapter for Dev.to Forem API — Comments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: comments
      description: Comments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: forem-comments.getcommentsbyarticleid
      with:
        a_id: tools.a_id
        p_id: tools.p_id
      outputParameters:
      - type: object
        mapping: $.
    - name: comment-id
      description: Comment by id
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: forem-comments.getcommentbyid
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.