PostHog · Capability

PostHog API — web_analytics

PostHog API — web_analytics. 2 operations. Lead operation: Summarize web analytics. Self-contained Naftiko capability covering one Posthog business surface.

Run with Naftiko Posthogweb_analytics

What You Can Do

GET
Webanalyticsweeklydigest — Summarize web analytics
/v1/api/environments/{project-id}/web-analytics/weekly-digest
GET
Webanalyticsweeklydigest — Summarize web analytics
/v1/api/environments/{project-id}/web-analytics/weekly-digest

MCP Tools

summarize-web-analytics

Summarize web analytics

read-only idempotent
summarize-web-analytics-2

Summarize web analytics

read-only idempotent

Capability Spec

posthog-web-analytics.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PostHog API — web_analytics
  description: 'PostHog API — web_analytics. 2 operations. Lead operation: Summarize web analytics. Self-contained Naftiko
    capability covering one Posthog business surface.'
  tags:
  - Posthog
  - web_analytics
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    POSTHOG_API_KEY: POSTHOG_API_KEY
capability:
  consumes:
  - type: http
    namespace: posthog-web-analytics
    baseUri: ''
    description: PostHog API — web_analytics business capability. Self-contained, no shared references.
    resources:
    - name: api-environments-project_id-web_analytics-weekly_digest
      path: /api/environments/{project_id}/web_analytics/weekly_digest/
      operations:
      - name: webanalyticsweeklydigest
        method: GET
        description: Summarize web analytics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: compare
          in: query
          type: boolean
          description: When true (default), include period-over-period change for each metric comparing against the prior
            equal-length period. Set to false to skip the comparison quer
        - name: days
          in: query
          type: integer
          description: Lookback window in days (1–90). Defaults to 7.
      - name: webanalyticsweeklydigest
        method: GET
        description: Summarize web analytics
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: compare
          in: query
          type: boolean
          description: When true (default), include period-over-period change for each metric comparing against the prior
            equal-length period. Set to false to skip the comparison quer
        - name: days
          in: query
          type: integer
          description: Lookback window in days (1–90). Defaults to 7.
    authentication:
      type: bearer
      token: '{{env.POSTHOG_API_KEY}}'
  exposes:
  - type: rest
    namespace: posthog-web-analytics-rest
    port: 8080
    description: REST adapter for PostHog API — web_analytics. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/environments/{project-id}/web-analytics/weekly-digest
      name: api-environments-project-id-web-analytics-weekly-digest
      description: REST surface for api-environments-project_id-web_analytics-weekly_digest.
      operations:
      - method: GET
        name: webanalyticsweeklydigest
        description: Summarize web analytics
        call: posthog-web-analytics.webanalyticsweeklydigest
        with:
          compare: rest.compare
          days: rest.days
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: webanalyticsweeklydigest
        description: Summarize web analytics
        call: posthog-web-analytics.webanalyticsweeklydigest
        with:
          compare: rest.compare
          days: rest.days
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: posthog-web-analytics-mcp
    port: 9090
    transport: http
    description: MCP adapter for PostHog API — web_analytics. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: summarize-web-analytics
      description: Summarize web analytics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-web-analytics.webanalyticsweeklydigest
      with:
        compare: tools.compare
        days: tools.days
      outputParameters:
      - type: object
        mapping: $.
    - name: summarize-web-analytics-2
      description: Summarize web analytics
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: posthog-web-analytics.webanalyticsweeklydigest
      with:
        compare: tools.compare
        days: tools.days
      outputParameters:
      - type: object
        mapping: $.