Stack Exchange · Capability
Stack Exchange API v2.3 — Comments
Comments surface of the Stack Exchange API. 2 operations. Lead operation: List Comments. Self-contained Naftiko capability covering one Stack Exchange business surface.
What You Can Do
GET
Listcomments
— List Comments
/v1/comments
GET
Getcommentsbyids
— Get Comments by Ids
/v1/comments/{ids}
MCP Tools
list-comments
List Comments
read-only
idempotent
get-comments-ids
Get Comments by Ids
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: Stack Exchange API v2.3 — Comments
description: 'Comments surface of the Stack Exchange API. 2 operations. Lead operation: List Comments. Self-contained Naftiko capability covering one Stack Exchange business surface.'
tags:
- Stack Exchange
- Q And A
- Comments
created: '2026-05-29'
modified: '2026-05-29'
binds:
- namespace: env
keys:
STACK_EXCHANGE_KEY: STACK_EXCHANGE_KEY
STACK_EXCHANGE_ACCESS_TOKEN: STACK_EXCHANGE_ACCESS_TOKEN
capability:
consumes:
- type: http
namespace: stack-exchange-comments
baseUri: https://api.stackexchange.com/2.3
description: Stack Exchange API v2.3 — Comments business capability. Self-contained, no shared references.
authentication:
type: apikey
key: key
value: '{{env.STACK_EXCHANGE_KEY}}'
placement: query
resources:
- name: comments
path: /comments
operations:
- name: listComments
method: GET
description: List Comments
inputParameters:
- name: site
in: query
type: string
required: true
description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
- name: key
in: query
type: string
required: false
description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
- name: filter
in: query
type: string
required: false
description: Custom response filter id created via /filters/create.
- name: page
in: query
type: integer
required: false
description: 1-indexed page number.
- name: pagesize
in: query
type: integer
required: false
description: Items per page (max 100).
- name: order
in: query
type: string
required: false
description: Sort direction.
- name: fromdate
in: query
type: integer
required: false
description: Unix epoch seconds — earliest creation_date.
- name: todate
in: query
type: integer
required: false
description: Unix epoch seconds — latest creation_date.
- name: sort
in: query
type: string
required: false
description: sort parameter
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: comments-ids
path: /comments/{ids}
operations:
- name: getCommentsByIds
method: GET
description: Get Comments by Ids
inputParameters:
- name: ids
in: path
type: string
required: true
description: Up to 100 semicolon-delimited ids of the resource.
- name: site
in: query
type: string
required: true
description: Target Q&A community. Either the api_site_parameter from a `/sites` entry (e.g. `stackoverflow`, `serverfault`, `superuser`) or a full domain (`stackoverflow.com`).
- name: key
in: query
type: string
required: false
description: App key from stackapps.com. Raises the daily quota to 10,000/IP.
- name: filter
in: query
type: string
required: false
description: Custom response filter id created via /filters/create.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
exposes:
- type: rest
namespace: stack-exchange-comments-rest
port: 8080
description: REST adapter for Stack Exchange API v2.3 — 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: listComments
description: List Comments
call: stack-exchange-comments.listComments
with:
site: rest.site
key: rest.key
filter: rest.filter
page: rest.page
pagesize: rest.pagesize
order: rest.order
fromdate: rest.fromdate
todate: rest.todate
sort: rest.sort
outputParameters:
- type: object
mapping: $.
- path: /v1/comments/{ids}
name: comments
description: REST surface for comments.
operations:
- method: GET
name: getCommentsByIds
description: Get Comments by Ids
call: stack-exchange-comments.getCommentsByIds
with:
ids: rest.ids
site: rest.site
key: rest.key
filter: rest.filter
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: stack-exchange-comments-mcp
port: 9090
transport: http
description: MCP adapter for Stack Exchange API v2.3 — 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: stack-exchange-comments.listComments
with:
site: tools.site
key: tools.key
filter: tools.filter
page: tools.page
pagesize: tools.pagesize
order: tools.order
fromdate: tools.fromdate
todate: tools.todate
sort: tools.sort
outputParameters:
- type: object
mapping: $.
- name: get-comments-ids
description: Get Comments by Ids
hints:
readOnly: true
destructive: false
idempotent: true
call: stack-exchange-comments.getCommentsByIds
with:
ids: tools.ids
site: tools.site
key: tools.key
filter: tools.filter
outputParameters:
- type: object
mapping: $.