naftiko: 1.0.0-alpha2 info: label: PostHog API — max description: 'PostHog API — max. 10 operations. Lead operation: max. Self-contained Naftiko capability covering one Posthog business surface.' tags: - Posthog - max created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: POSTHOG_API_KEY: POSTHOG_API_KEY capability: consumes: - type: http namespace: posthog-max baseUri: '' description: PostHog API — max business capability. Self-contained, no shared references. resources: - name: api-environments-project_id-conversations path: /api/environments/{project_id}/conversations/ operations: - name: conversationslist method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: limit in: query type: integer description: Number of results to return per page. - name: offset in: query type: integer description: The initial index from which to return the results. - name: conversationscreate method: POST description: Unified endpoint that handles both conversation creation and streaming. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: api-environments-project_id-conversations-conversation path: /api/environments/{project_id}/conversations/{conversation}/ operations: - name: conversationsretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: api-environments-project_id-conversations-conversation-append_message path: /api/environments/{project_id}/conversations/{conversation}/append_message/ operations: - name: conversationsappendmessagecreate method: POST description: Appends a message to an existing conversation without triggering AI processing. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-environments-project_id-conversations-conversation-cancel path: /api/environments/{project_id}/conversations/{conversation}/cancel/ operations: - name: conversationscancelpartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-environments-project_id-conversations-conversation-queue path: /api/environments/{project_id}/conversations/{conversation}/queue/ operations: - name: conversationsqueueretrieve method: GET description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: conversationsqueuecreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-environments-project_id-conversations-conversation-queue-clear path: /api/environments/{project_id}/conversations/{conversation}/queue/clear/ operations: - name: conversationsqueueclearcreate method: POST description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: api-environments-project_id-conversations-conversation-queue-queue_id path: /api/environments/{project_id}/conversations/{conversation}/queue/{queue_id}/ operations: - name: conversationsqueuepartialupdate method: PATCH description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: queue_id in: path type: string required: true - name: body in: body type: object description: Request body (JSON). required: false - name: conversationsqueuedestroy method: DELETE description: '' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: conversation in: path type: string description: A UUID string identifying this conversation. required: true - name: queue_id in: path type: string required: true authentication: type: bearer token: '{{env.POSTHOG_API_KEY}}' exposes: - type: rest namespace: posthog-max-rest port: 8080 description: REST adapter for PostHog API — max. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/environments/{project-id}/conversations name: api-environments-project-id-conversations description: REST surface for api-environments-project_id-conversations. operations: - method: GET name: conversationslist description: conversationslist call: posthog-max.conversationslist with: limit: rest.limit offset: rest.offset outputParameters: - type: object mapping: $. - method: POST name: conversationscreate description: Unified endpoint that handles both conversation creation and streaming. call: posthog-max.conversationscreate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation} name: api-environments-project-id-conversations-conversation description: REST surface for api-environments-project_id-conversations-conversation. operations: - method: GET name: conversationsretrieve description: conversationsretrieve call: posthog-max.conversationsretrieve with: conversation: rest.conversation outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation}/append-message name: api-environments-project-id-conversations-conversation-append-message description: REST surface for api-environments-project_id-conversations-conversation-append_message. operations: - method: POST name: conversationsappendmessagecreate description: Appends a message to an existing conversation without triggering AI processing. call: posthog-max.conversationsappendmessagecreate with: conversation: rest.conversation body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation}/cancel name: api-environments-project-id-conversations-conversation-cancel description: REST surface for api-environments-project_id-conversations-conversation-cancel. operations: - method: PATCH name: conversationscancelpartialupdate description: conversationscancelpartialupdate call: posthog-max.conversationscancelpartialupdate with: conversation: rest.conversation body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation}/queue name: api-environments-project-id-conversations-conversation-queue description: REST surface for api-environments-project_id-conversations-conversation-queue. operations: - method: GET name: conversationsqueueretrieve description: conversationsqueueretrieve call: posthog-max.conversationsqueueretrieve with: conversation: rest.conversation outputParameters: - type: object mapping: $. - method: POST name: conversationsqueuecreate description: conversationsqueuecreate call: posthog-max.conversationsqueuecreate with: conversation: rest.conversation body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation}/queue/clear name: api-environments-project-id-conversations-conversation-queue-clear description: REST surface for api-environments-project_id-conversations-conversation-queue-clear. operations: - method: POST name: conversationsqueueclearcreate description: conversationsqueueclearcreate call: posthog-max.conversationsqueueclearcreate with: conversation: rest.conversation body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/environments/{project-id}/conversations/{conversation}/queue/{queue-id} name: api-environments-project-id-conversations-conversation-queue-queue-id description: REST surface for api-environments-project_id-conversations-conversation-queue-queue_id. operations: - method: PATCH name: conversationsqueuepartialupdate description: conversationsqueuepartialupdate call: posthog-max.conversationsqueuepartialupdate with: conversation: rest.conversation queue_id: rest.queue_id body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: conversationsqueuedestroy description: conversationsqueuedestroy call: posthog-max.conversationsqueuedestroy with: conversation: rest.conversation queue_id: rest.queue_id outputParameters: - type: object mapping: $. - type: mcp namespace: posthog-max-mcp port: 9090 transport: http description: MCP adapter for PostHog API — max. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: conversationslist description: conversationslist hints: readOnly: true destructive: false idempotent: true call: posthog-max.conversationslist with: limit: tools.limit offset: tools.offset outputParameters: - type: object mapping: $. - name: unified-endpoint-that-handles-both description: Unified endpoint that handles both conversation creation and streaming. hints: readOnly: false destructive: false idempotent: false call: posthog-max.conversationscreate with: body: tools.body outputParameters: - type: object mapping: $. - name: conversationsretrieve description: conversationsretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-max.conversationsretrieve with: conversation: tools.conversation outputParameters: - type: object mapping: $. - name: appends-message-existing-conversation-without description: Appends a message to an existing conversation without triggering AI processing. hints: readOnly: false destructive: false idempotent: false call: posthog-max.conversationsappendmessagecreate with: conversation: tools.conversation body: tools.body outputParameters: - type: object mapping: $. - name: conversationscancelpartialupdate description: conversationscancelpartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-max.conversationscancelpartialupdate with: conversation: tools.conversation body: tools.body outputParameters: - type: object mapping: $. - name: conversationsqueueretrieve description: conversationsqueueretrieve hints: readOnly: true destructive: false idempotent: true call: posthog-max.conversationsqueueretrieve with: conversation: tools.conversation outputParameters: - type: object mapping: $. - name: conversationsqueuecreate description: conversationsqueuecreate hints: readOnly: false destructive: false idempotent: false call: posthog-max.conversationsqueuecreate with: conversation: tools.conversation body: tools.body outputParameters: - type: object mapping: $. - name: conversationsqueueclearcreate description: conversationsqueueclearcreate hints: readOnly: false destructive: false idempotent: false call: posthog-max.conversationsqueueclearcreate with: conversation: tools.conversation body: tools.body outputParameters: - type: object mapping: $. - name: conversationsqueuepartialupdate description: conversationsqueuepartialupdate hints: readOnly: false destructive: false idempotent: true call: posthog-max.conversationsqueuepartialupdate with: conversation: tools.conversation queue_id: tools.queue_id body: tools.body outputParameters: - type: object mapping: $. - name: conversationsqueuedestroy description: conversationsqueuedestroy hints: readOnly: false destructive: true idempotent: true call: posthog-max.conversationsqueuedestroy with: conversation: tools.conversation queue_id: tools.queue_id outputParameters: - type: object mapping: $.