Chat · Capability

Reference Chat API — Conversations

Reference Chat API — Conversations. 3 operations. Lead operation: List conversations. Self-contained Naftiko capability covering one Chat business surface.

Run with Naftiko ChatConversations

What You Can Do

GET
Listconversations — List conversations
/v1/conversations
POST
Createconversation — Create a conversation
/v1/conversations
GET
Getconversation — Get a conversation
/v1/conversations/{conversationid}

MCP Tools

list-conversations

List conversations

read-only idempotent
create-conversation

Create a conversation

get-conversation

Get a conversation

read-only idempotent

Capability Spec

reference-conversations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Reference Chat API — Conversations
  description: 'Reference Chat API — Conversations. 3 operations. Lead operation: List conversations. Self-contained Naftiko
    capability covering one Chat business surface.'
  tags:
  - Chat
  - Conversations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CHAT_API_KEY: CHAT_API_KEY
capability:
  consumes:
  - type: http
    namespace: reference-conversations
    baseUri: https://api.example.com/v1/chat
    description: Reference Chat API — Conversations business capability. Self-contained, no shared references.
    resources:
    - name: conversations
      path: /conversations
      operations:
      - name: listconversations
        method: GET
        description: List conversations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cursor
          in: query
          type: string
        - name: limit
          in: query
          type: integer
      - name: createconversation
        method: POST
        description: Create a conversation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: conversations-conversationId
      path: /conversations/{conversationId}
      operations:
      - name: getconversation
        method: GET
        description: Get a conversation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.CHAT_API_KEY}}'
  exposes:
  - type: rest
    namespace: reference-conversations-rest
    port: 8080
    description: REST adapter for Reference Chat API — Conversations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/conversations
      name: conversations
      description: REST surface for conversations.
      operations:
      - method: GET
        name: listconversations
        description: List conversations
        call: reference-conversations.listconversations
        with:
          cursor: rest.cursor
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createconversation
        description: Create a conversation
        call: reference-conversations.createconversation
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/conversations/{conversationid}
      name: conversations-conversationid
      description: REST surface for conversations-conversationId.
      operations:
      - method: GET
        name: getconversation
        description: Get a conversation
        call: reference-conversations.getconversation
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: reference-conversations-mcp
    port: 9090
    transport: http
    description: MCP adapter for Reference Chat API — Conversations. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-conversations
      description: List conversations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: reference-conversations.listconversations
      with:
        cursor: tools.cursor
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: create-conversation
      description: Create a conversation
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: reference-conversations.createconversation
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-conversation
      description: Get a conversation
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: reference-conversations.getconversation
      outputParameters:
      - type: object
        mapping: $.