Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

5.3 KB
Raw Blame
# MCP tool definitions. Tools are opt-in: an operation is exposed only when it has an entry here.
# List operations without an entry: pnpm --filter=@posthog/mcp run scaffold-yaml -- --candidates --product context_layer
# Add one: pnpm --filter=@posthog/mcp run scaffold-yaml -- --add <operationId> --product context_layer
# To keep an operation off on purpose, set enabled: false and give a disabled_reason.
category: Context wiki
feature: context_layer
url_prefix: /
ui_apps: {}
tools:
    context-wiki-channel-resolve:
        operation: context_layer_agent_channel_pages_retrieve
        enabled: true
        scopes:
            - organization:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Resolve a channel context page
        description: >
            Resolve a channel id to its repo-relative page path in the organization context wiki. Use the returned path
            with context-wiki-page-retrieve and context-wiki-page-update. Do not derive a path from the channel name.
        feature_flag: context-layer
    context-wiki-page-retrieve:
        operation: context_layer_agent_pages_retrieve
        enabled: true
        scopes:
            - organization:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Read a context wiki page
        description: >
            Read one repo-relative Markdown page from the organization context wiki. Returns its content and head_sha;
            pass that head_sha as base_head when updating the page. Reads are bounded. Follow next_offset with the same
            head_sha and limit until complete is true. Join content chunks in order before editing. On 409, discard the
            chunks and restart at offset zero.
        param_overrides:
            limit:
                input_schema: WikiPageReadLimitSchema
        feature_flag: context-layer
    context-wiki-page-update:
        operation: context_layer_agent_pages_update
        enabled: true
        scopes:
            - organization:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Update a context wiki page
        description: >
            Replace one context wiki page with complete Markdown content. Read it first and pass its head_sha as
            base_head. A concurrent wiki change returns a conflict instead of being overwritten.
        feature_flag: context-layer
    task-context-wiki-channel-resolve:
        operation: context_layer_agent_channel_pages_retrieve
        enabled: true
        scopes:
            - task:read
            - internal_run:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Resolve this task's channel context page
        description: Resolve the current task's channel id to its context wiki page path for an unattended task run.
        feature_flag: context-layer
    task-context-wiki-page-propose:
        operation: context_layer_agent_proposals_create
        enabled: true
        scopes:
            - task:write
            - internal_run:read
            - context_layer_internal:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Suggest a shared wiki edit
        description: >
            Propose a correction to an existing shared Markdown page under org/, areas/, or decisions/. Read it first
            and pass head_sha as base_head. This stores an immutable suggestion, not a published edit. Ask the user to
            open Context > Suggested edits, review the diff, and apply it. Tasks cannot approve suggestions or publish
            bundles. Shared pages cannot include channel_id frontmatter.
        feature_flag: context-layer
    task-context-wiki-page-retrieve:
        operation: context_layer_agent_pages_retrieve
        enabled: true
        scopes:
            - task:read
            - internal_run:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Read this task's context wiki page
        description: >
            Read a bounded context wiki page chunk and its head_sha for an unattended task run. Follow next_offset with
            the same head_sha and limit until complete is true. Join all content chunks before editing. On 409, discard
            the chunks and restart at offset zero.
        param_overrides:
            limit:
                input_schema: WikiPageReadLimitSchema
        feature_flag: context-layer
    task-context-wiki-page-update:
        operation: context_layer_agent_pages_update
        enabled: true
        scopes:
            - task:write
            - internal_run:read
            - context_layer_internal:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Update this task's context wiki page
        description: >
            Replace the current task channel's context page. Read it first and pass head_sha as base_head. Shared pages
            require task-context-wiki-page-propose and human review. Instruction files, generated indexes, scripts, and
            other channels' pages cannot be edited.
        feature_flag: context-layer