Stack Exchange · Capability

Stack Exchange API v2.3 — Posts

Posts surface of the Stack Exchange API. 5 operations. Lead operation: List Posts. Self-contained Naftiko capability covering one Stack Exchange business surface.

Run with Naftiko Stack ExchangeQ And APosts

What You Can Do

GET
Listposts — List Posts
/v1/posts
GET
Getpostsbyids — Get Posts by Ids
/v1/posts/{ids}
GET
Listcommentsonposts — List Comments on Posts
/v1/posts/{ids}/comments
GET
Listpostsrevisions — List Posts Revisions
/v1/posts/{ids}/revisions
GET
Listpostssuggestededits — List Posts Suggested Edits
/v1/posts/{ids}/suggested-edits

MCP Tools

list-posts

List Posts

read-only idempotent
get-posts-ids

Get Posts by Ids

read-only idempotent
list-comments-posts

List Comments on Posts

read-only idempotent
list-posts-revisions

List Posts Revisions

read-only idempotent
list-posts-suggested-edits

List Posts Suggested Edits

read-only idempotent

Capability Spec

stack-exchange-posts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stack Exchange API v2.3 — Posts
  description: 'Posts surface of the Stack Exchange API. 5 operations. Lead operation: List Posts. Self-contained Naftiko capability covering one Stack Exchange business surface.'
  tags:
  - Stack Exchange
  - Q And A
  - Posts
  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-posts
    baseUri: https://api.stackexchange.com/2.3
    description: Stack Exchange API v2.3 — Posts business capability. Self-contained, no shared references.
    authentication:
      type: apikey
      key: key
      value: '{{env.STACK_EXCHANGE_KEY}}'
      placement: query
    resources:
    - name: posts
      path: /posts
      operations:
      - name: listPosts
        method: GET
        description: List Posts
        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).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: posts-ids
      path: /posts/{ids}
      operations:
      - name: getPostsByIds
        method: GET
        description: Get Posts 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: $.
    - name: posts-ids-comments
      path: /posts/{ids}/comments
      operations:
      - name: listCommentsOnPosts
        method: GET
        description: List Comments on Posts
        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.
        - 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).
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: posts-ids-revisions
      path: /posts/{ids}/revisions
      operations:
      - name: listPostsRevisions
        method: GET
        description: List Posts Revisions
        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: $.
    - name: posts-ids-suggested-edits
      path: /posts/{ids}/suggested-edits
      operations:
      - name: listPostsSuggestedEdits
        method: GET
        description: List Posts Suggested Edits
        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-posts-rest
    port: 8080
    description: REST adapter for Stack Exchange API v2.3 — Posts. One Spectral-compliant resource per consumed operation, prefixed with /v1.
    resources:
    - path: /v1/posts
      name: posts
      description: REST surface for posts.
      operations:
      - method: GET
        name: listPosts
        description: List Posts
        call: stack-exchange-posts.listPosts
        with:
          site: rest.site
          key: rest.key
          filter: rest.filter
          page: rest.page
          pagesize: rest.pagesize
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/posts/{ids}
      name: posts
      description: REST surface for posts.
      operations:
      - method: GET
        name: getPostsByIds
        description: Get Posts by Ids
        call: stack-exchange-posts.getPostsByIds
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/posts/{ids}/comments
      name: comments
      description: REST surface for posts.
      operations:
      - method: GET
        name: listCommentsOnPosts
        description: List Comments on Posts
        call: stack-exchange-posts.listCommentsOnPosts
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
          page: rest.page
          pagesize: rest.pagesize
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/posts/{ids}/revisions
      name: revisions
      description: REST surface for posts.
      operations:
      - method: GET
        name: listPostsRevisions
        description: List Posts Revisions
        call: stack-exchange-posts.listPostsRevisions
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/posts/{ids}/suggested-edits
      name: suggested-edits
      description: REST surface for posts.
      operations:
      - method: GET
        name: listPostsSuggestedEdits
        description: List Posts Suggested Edits
        call: stack-exchange-posts.listPostsSuggestedEdits
        with:
          ids: rest.ids
          site: rest.site
          key: rest.key
          filter: rest.filter
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stack-exchange-posts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stack Exchange API v2.3 — Posts. One tool per consumed operation, routed inline through this capability's consumes block.
    tools:
    - name: list-posts
      description: List Posts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-posts.listPosts
      with:
        site: tools.site
        key: tools.key
        filter: tools.filter
        page: tools.page
        pagesize: tools.pagesize
      outputParameters:
      - type: object
        mapping: $.
    - name: get-posts-ids
      description: Get Posts by Ids
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-posts.getPostsByIds
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: list-comments-posts
      description: List Comments on Posts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-posts.listCommentsOnPosts
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
        page: tools.page
        pagesize: tools.pagesize
      outputParameters:
      - type: object
        mapping: $.
    - name: list-posts-revisions
      description: List Posts Revisions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-posts.listPostsRevisions
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.
    - name: list-posts-suggested-edits
      description: List Posts Suggested Edits
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-posts.listPostsSuggestedEdits
      with:
        ids: tools.ids
        site: tools.site
        key: tools.key
        filter: tools.filter
      outputParameters:
      - type: object
        mapping: $.