naftiko: 1.0.0-alpha2 info: label: Discourse API Documentation — Private Messages description: 'Discourse API Documentation — Private Messages. 3 operations. Lead operation: Creates a new topic, a new post, or a private message. Self-contained Naftiko capability covering one Discourse business surface.' tags: - Discourse - Private Messages created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DISCOURSE_API_KEY: DISCOURSE_API_KEY capability: consumes: - type: http namespace: discourse-private-messages baseUri: https://{defaultHost} description: Discourse API Documentation — Private Messages business capability. Self-contained, no shared references. resources: - name: posts.json path: /posts.json operations: - name: createtopicpostpm method: POST description: Creates a new topic, a new post, or a private message outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: topics-private-messages-sent-username}.json path: /topics/private-messages-sent/{username}.json operations: - name: getusersentprivatemessages method: GET description: Get a list of private messages sent for a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: username in: path type: string required: true - name: topics-private-messages-username}.json path: /topics/private-messages/{username}.json operations: - name: listuserprivatemessages method: GET description: Get a list of private messages for a user outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: username in: path type: string required: true exposes: - type: rest namespace: discourse-private-messages-rest port: 8080 description: REST adapter for Discourse API Documentation — Private Messages. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/posts-json name: posts-json description: REST surface for posts.json. operations: - method: POST name: createtopicpostpm description: Creates a new topic, a new post, or a private message call: discourse-private-messages.createtopicpostpm with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/topics/private-messages-sent/username-json name: topics-private-messages-sent-username-json description: REST surface for topics-private-messages-sent-username}.json. operations: - method: GET name: getusersentprivatemessages description: Get a list of private messages sent for a user call: discourse-private-messages.getusersentprivatemessages with: username: rest.username outputParameters: - type: object mapping: $. - path: /v1/topics/private-messages/username-json name: topics-private-messages-username-json description: REST surface for topics-private-messages-username}.json. operations: - method: GET name: listuserprivatemessages description: Get a list of private messages for a user call: discourse-private-messages.listuserprivatemessages with: username: rest.username outputParameters: - type: object mapping: $. - type: mcp namespace: discourse-private-messages-mcp port: 9090 transport: http description: MCP adapter for Discourse API Documentation — Private Messages. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: creates-new-topic-new-post description: Creates a new topic, a new post, or a private message hints: readOnly: false destructive: false idempotent: false call: discourse-private-messages.createtopicpostpm with: body: tools.body outputParameters: - type: object mapping: $. - name: get-list-private-messages-sent description: Get a list of private messages sent for a user hints: readOnly: true destructive: false idempotent: true call: discourse-private-messages.getusersentprivatemessages with: username: tools.username outputParameters: - type: object mapping: $. - name: get-list-private-messages-user description: Get a list of private messages for a user hints: readOnly: true destructive: false idempotent: true call: discourse-private-messages.listuserprivatemessages with: username: tools.username outputParameters: - type: object mapping: $.