naftiko: 1.0.0-alpha2 info: label: Reddit Data API — Messages description: 'Reddit Data API — Messages. 6 operations. Lead operation: Compose a Private Message. Self-contained Naftiko capability covering one Reddit business surface.' tags: - Reddit - Messages created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: REDDIT_API_KEY: REDDIT_API_KEY capability: consumes: - type: http namespace: data-messages baseUri: https://oauth.reddit.com description: Reddit Data API — Messages business capability. Self-contained, no shared references. resources: - name: api-compose path: /api/compose operations: - name: composemessage method: POST description: Compose a Private Message outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-read_all_messages path: /api/read_all_messages operations: - name: readallmessages method: POST description: Mark All Messages As Read outputRawFormat: json outputParameters: - name: result type: object value: $. - name: api-read_message path: /api/read_message operations: - name: readmessage method: POST description: Mark Messages As Read outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: message-inbox path: /message/inbox operations: - name: getinbox method: GET description: Get Inbox Messages outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: mark in: query type: boolean description: Whether to mark messages as read. - name: message-sent path: /message/sent operations: - name: getsentmessages method: GET description: Get Sent Messages outputRawFormat: json outputParameters: - name: result type: object value: $. - name: message-unread path: /message/unread operations: - name: getunreadmessages method: GET description: Get Unread Messages outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: mark in: query type: boolean description: Whether to mark messages as read. authentication: type: bearer token: '{{env.REDDIT_API_KEY}}' exposes: - type: rest namespace: data-messages-rest port: 8080 description: REST adapter for Reddit Data API — Messages. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/compose name: api-compose description: REST surface for api-compose. operations: - method: POST name: composemessage description: Compose a Private Message call: data-messages.composemessage with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/read-all-messages name: api-read-all-messages description: REST surface for api-read_all_messages. operations: - method: POST name: readallmessages description: Mark All Messages As Read call: data-messages.readallmessages outputParameters: - type: object mapping: $. - path: /v1/api/read-message name: api-read-message description: REST surface for api-read_message. operations: - method: POST name: readmessage description: Mark Messages As Read call: data-messages.readmessage with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/message/inbox name: message-inbox description: REST surface for message-inbox. operations: - method: GET name: getinbox description: Get Inbox Messages call: data-messages.getinbox with: mark: rest.mark outputParameters: - type: object mapping: $. - path: /v1/message/sent name: message-sent description: REST surface for message-sent. operations: - method: GET name: getsentmessages description: Get Sent Messages call: data-messages.getsentmessages outputParameters: - type: object mapping: $. - path: /v1/message/unread name: message-unread description: REST surface for message-unread. operations: - method: GET name: getunreadmessages description: Get Unread Messages call: data-messages.getunreadmessages with: mark: rest.mark outputParameters: - type: object mapping: $. - type: mcp namespace: data-messages-mcp port: 9090 transport: http description: MCP adapter for Reddit Data API — Messages. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: compose-private-message description: Compose a Private Message hints: readOnly: false destructive: false idempotent: false call: data-messages.composemessage with: body: tools.body outputParameters: - type: object mapping: $. - name: mark-all-messages-read description: Mark All Messages As Read hints: readOnly: false destructive: false idempotent: false call: data-messages.readallmessages outputParameters: - type: object mapping: $. - name: mark-messages-read description: Mark Messages As Read hints: readOnly: false destructive: false idempotent: false call: data-messages.readmessage with: body: tools.body outputParameters: - type: object mapping: $. - name: get-inbox-messages description: Get Inbox Messages hints: readOnly: true destructive: false idempotent: true call: data-messages.getinbox with: mark: tools.mark outputParameters: - type: object mapping: $. - name: get-sent-messages description: Get Sent Messages hints: readOnly: true destructive: false idempotent: true call: data-messages.getsentmessages outputParameters: - type: object mapping: $. - name: get-unread-messages description: Get Unread Messages hints: readOnly: true destructive: false idempotent: true call: data-messages.getunreadmessages with: mark: tools.mark outputParameters: - type: object mapping: $.