naftiko: 1.0.0-alpha2 info: label: Discourse API Documentation — Posts description: 'Discourse API Documentation — Posts. 8 operations. Lead operation: Like a post and other actions. Self-contained Naftiko capability covering one Discourse business surface.' tags: - Discourse - Posts created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: DISCOURSE_API_KEY: DISCOURSE_API_KEY capability: consumes: - type: http namespace: discourse-posts baseUri: https://{defaultHost} description: Discourse API Documentation — Posts business capability. Self-contained, no shared references. resources: - name: post_actions.json path: /post_actions.json operations: - name: performpostaction method: POST description: Like a post and other actions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Api-Key in: header type: string required: true - name: Api-Username in: header type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: posts.json path: /posts.json operations: - name: listposts method: GET description: List latest posts across topics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: before in: query type: integer description: Load posts with an id lower than this value. Useful for pagination. - 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: posts-id}.json path: /posts/{id}.json operations: - name: getpost method: GET description: Retrieve a single post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: updatepost method: PUT description: Update a single post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: deletepost method: DELETE description: delete a single post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: body in: body type: object description: Request body (JSON). required: false - name: posts-id-locked.json path: /posts/{id}/locked.json operations: - name: lockpost method: PUT description: Lock a post from being edited outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Api-Key in: header type: string required: true - name: Api-Username in: header type: string required: true - name: id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: posts-id-replies.json path: /posts/{id}/replies.json operations: - name: postreplies method: GET description: List replies to a post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string required: true exposes: - type: rest namespace: discourse-posts-rest port: 8080 description: REST adapter for Discourse API Documentation — Posts. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/post-actions-json name: post-actions-json description: REST surface for post_actions.json. operations: - method: POST name: performpostaction description: Like a post and other actions call: discourse-posts.performpostaction with: Api-Key: rest.Api-Key Api-Username: rest.Api-Username body: rest.body outputParameters: - type: object mapping: $. - path: /v1/posts-json name: posts-json description: REST surface for posts.json. operations: - method: GET name: listposts description: List latest posts across topics call: discourse-posts.listposts with: before: rest.before outputParameters: - type: object mapping: $. - method: POST name: createtopicpostpm description: Creates a new topic, a new post, or a private message call: discourse-posts.createtopicpostpm with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/posts/id-json name: posts-id-json description: REST surface for posts-id}.json. operations: - method: GET name: getpost description: Retrieve a single post call: discourse-posts.getpost with: id: rest.id outputParameters: - type: object mapping: $. - method: PUT name: updatepost description: Update a single post call: discourse-posts.updatepost with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: deletepost description: delete a single post call: discourse-posts.deletepost with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/posts/{id}/locked-json name: posts-id-locked-json description: REST surface for posts-id-locked.json. operations: - method: PUT name: lockpost description: Lock a post from being edited call: discourse-posts.lockpost with: Api-Key: rest.Api-Key Api-Username: rest.Api-Username id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/posts/{id}/replies-json name: posts-id-replies-json description: REST surface for posts-id-replies.json. operations: - method: GET name: postreplies description: List replies to a post call: discourse-posts.postreplies with: id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: discourse-posts-mcp port: 9090 transport: http description: MCP adapter for Discourse API Documentation — Posts. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: like-post-and-other-actions description: Like a post and other actions hints: readOnly: false destructive: false idempotent: false call: discourse-posts.performpostaction with: Api-Key: tools.Api-Key Api-Username: tools.Api-Username body: tools.body outputParameters: - type: object mapping: $. - name: list-latest-posts-across-topics description: List latest posts across topics hints: readOnly: true destructive: false idempotent: true call: discourse-posts.listposts with: before: tools.before outputParameters: - type: object mapping: $. - 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-posts.createtopicpostpm with: body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-single-post description: Retrieve a single post hints: readOnly: true destructive: false idempotent: true call: discourse-posts.getpost with: id: tools.id outputParameters: - type: object mapping: $. - name: update-single-post description: Update a single post hints: readOnly: false destructive: false idempotent: true call: discourse-posts.updatepost with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: delete-single-post description: delete a single post hints: readOnly: false destructive: true idempotent: true call: discourse-posts.deletepost with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: lock-post-being-edited description: Lock a post from being edited hints: readOnly: false destructive: false idempotent: true call: discourse-posts.lockpost with: Api-Key: tools.Api-Key Api-Username: tools.Api-Username id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: list-replies-post description: List replies to a post hints: readOnly: true destructive: false idempotent: true call: discourse-posts.postreplies with: id: tools.id outputParameters: - type: object mapping: $.