WordPress · Capability

WordPress REST API — Comments

WordPress REST API — Comments. 2 operations. Lead operation: WordPress List Comments. Self-contained Naftiko capability covering one Wordpress business surface.

Run with Naftiko WordpressComments

What You Can Do

GET
Listcomments — WordPress List Comments
/v1/wp/v2/comments
POST
Createcomment — WordPress Create Comment
/v1/wp/v2/comments

MCP Tools

wordpress-list-comments

WordPress List Comments

read-only idempotent
wordpress-create-comment

WordPress Create Comment

Capability Spec

rest-comments.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: WordPress REST API — Comments
  description: 'WordPress REST API — Comments. 2 operations. Lead operation: WordPress List Comments. Self-contained Naftiko
    capability covering one Wordpress business surface.'
  tags:
  - Wordpress
  - Comments
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    WORDPRESS_API_KEY: WORDPRESS_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-comments
    baseUri: https://{site}/wp-json
    description: WordPress REST API — Comments business capability. Self-contained, no shared references.
    resources:
    - name: wp-v2-comments
      path: /wp/v2/comments
      operations:
      - name: listcomments
        method: GET
        description: WordPress List Comments
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: page
          in: query
          type: integer
          description: Current page of the collection.
        - name: per_page
          in: query
          type: integer
          description: Maximum number of items to be returned.
        - name: post
          in: query
          type: array
          description: Limit result set to comments assigned to specific post IDs.
        - name: status
          in: query
          type: string
          description: Limit result set to comments assigned a specific status.
      - name: createcomment
        method: POST
        description: WordPress Create Comment
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: wordpress_logged_in
      value: '{{env.WORDPRESS_API_KEY}}'
      placement: cookie
  exposes:
  - type: rest
    namespace: rest-comments-rest
    port: 8080
    description: REST adapter for WordPress REST API — Comments. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/wp/v2/comments
      name: wp-v2-comments
      description: REST surface for wp-v2-comments.
      operations:
      - method: GET
        name: listcomments
        description: WordPress List Comments
        call: rest-comments.listcomments
        with:
          page: rest.page
          per_page: rest.per_page
          post: rest.post
          status: rest.status
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createcomment
        description: WordPress Create Comment
        call: rest-comments.createcomment
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-comments-mcp
    port: 9090
    transport: http
    description: MCP adapter for WordPress REST API — Comments. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: wordpress-list-comments
      description: WordPress List Comments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-comments.listcomments
      with:
        page: tools.page
        per_page: tools.per_page
        post: tools.post
        status: tools.status
      outputParameters:
      - type: object
        mapping: $.
    - name: wordpress-create-comment
      description: WordPress Create Comment
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-comments.createcomment
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.