Stack Exchange · Capability

Stack Exchange API — Badges

Stack Exchange API — Badges. 2 operations. Lead operation: Get All Badges. Self-contained Naftiko capability covering one Stack Exchange business surface.

Run with Naftiko Stack ExchangeBadges

What You Can Do

GET
Getbadges — Get All Badges
/v1/badges
GET
Getbadgesbyids — Get Badges by IDs
/v1/badges/{ids}

MCP Tools

get-all-badges

Get All Badges

read-only idempotent
get-badges-ids

Get Badges by IDs

read-only idempotent

Capability Spec

stack-exchange-badges.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Stack Exchange API — Badges
  description: 'Stack Exchange API — Badges. 2 operations. Lead operation: Get All Badges. Self-contained Naftiko capability
    covering one Stack Exchange business surface.'
  tags:
  - Stack Exchange
  - Badges
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    STACK_EXCHANGE_API_KEY: STACK_EXCHANGE_API_KEY
capability:
  consumes:
  - type: http
    namespace: stack-exchange-badges
    baseUri: https://api.stackexchange.com/2.3
    description: Stack Exchange API — Badges business capability. Self-contained, no shared references.
    resources:
    - name: badges
      path: /badges
      operations:
      - name: getbadges
        method: GET
        description: Get All Badges
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: inname
          in: query
          type: string
          description: Filter badges whose name contains this string
    - name: badges-ids
      path: /badges/{ids}
      operations:
      - name: getbadgesbyids
        method: GET
        description: Get Badges by IDs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: ids
          in: path
          type: string
          description: Semicolon-delimited list of badge IDs
          required: true
    authentication:
      type: bearer
      token: '{{env.STACK_EXCHANGE_API_KEY}}'
  exposes:
  - type: rest
    namespace: stack-exchange-badges-rest
    port: 8080
    description: REST adapter for Stack Exchange API — Badges. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/badges
      name: badges
      description: REST surface for badges.
      operations:
      - method: GET
        name: getbadges
        description: Get All Badges
        call: stack-exchange-badges.getbadges
        with:
          inname: rest.inname
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/badges/{ids}
      name: badges-ids
      description: REST surface for badges-ids.
      operations:
      - method: GET
        name: getbadgesbyids
        description: Get Badges by IDs
        call: stack-exchange-badges.getbadgesbyids
        with:
          ids: rest.ids
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: stack-exchange-badges-mcp
    port: 9090
    transport: http
    description: MCP adapter for Stack Exchange API — Badges. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-all-badges
      description: Get All Badges
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.getbadges
      with:
        inname: tools.inname
      outputParameters:
      - type: object
        mapping: $.
    - name: get-badges-ids
      description: Get Badges by IDs
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: stack-exchange-badges.getbadgesbyids
      with:
        ids: tools.ids
      outputParameters:
      - type: object
        mapping: $.