: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(signals): enable scout-metadata-get mcp tool (#73087)
Andrew Maguireaa1843971a18
diff --git a/products/signals/mcp/tools.yaml b/products/signals/mcp/tools.yamlindex 943a6035064f..e53c0f2d637e 100644--- a/products/signals/mcp/tools.yaml+++ b/products/signals/mcp/tools.yaml@@ -514,7 +514,21 @@ tools:another owner). Pass `search` to narrow a large roster. Strictly team-scoped.scout-metadata-get:operation: signals_scout_metadata_get- enabled: false+ enabled: true+ scopes:+ - signal_scout:read+ annotations:+ readOnly: true+ destructive: false+ idempotent: true+ title: Get scout enrollment, banner, and run limits+ description: >+ Return this project's scout metadata: whether it is enrolled to run scouts, the current announcement banner+ (e.g. an early-access run-limit notice, or null when unset), and the enforced run limits with current usage+ — `max_runs_per_tick`, `max_runs_per_day` (null = unbounded), `runs_today`, and `runs_remaining_today`.+ Limits reflect what the scout coordinator actually applies at dispatch, so use this to size an enabled scout+ troop against the project's real daily run budget rather than assuming a value. Read-only and side-effect+ free.scout-project-profile-get:operation: signals_scout_project_profile_getenabled: truediff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex a7d5fe4cbe12..2dc23d18b076 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -7808,6 +7808,20 @@"readOnlyHint": true}},+ "scout-metadata-get": {+ "description": "Return this project's scout metadata: whether it is enrolled to run scouts, the current announcement banner (e.g. an early-access run-limit notice, or null when unset), and the enforced run limits with current usage — `max_runs_per_tick`, `max_runs_per_day` (null = unbounded), `runs_today`, and `runs_remaining_today`. Limits reflect what the scout coordinator actually applies at dispatch, so use this to size an enabled scout troop against the project's real daily run budget rather than assuming a value. Read-only and side-effect free.",+ "category": "Signals",+ "feature": "signals",+ "summary": "Get scout enrollment, banner, and run limits",+ "title": "Get scout enrollment, banner, and run limits",+ "required_scopes": ["signal_scout:read"],+ "annotations": {+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true,+ "readOnlyHint": true+ }+ },"scout-project-profile-get": {"description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `advanced-activity-logs-list`. Distinct from `scout-scratchpad-search`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.","category": "Signals",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 7d8040fef9c8..d6b4a4266099 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -8343,6 +8343,20 @@"readOnlyHint": true}},+ "scout-metadata-get": {+ "description": "Return this project's scout metadata: whether it is enrolled to run scouts, the current announcement banner (e.g. an early-access run-limit notice, or null when unset), and the enforced run limits with current usage — `max_runs_per_tick`, `max_runs_per_day` (null = unbounded), `runs_today`, and `runs_remaining_today`. Limits reflect what the scout coordinator actually applies at dispatch, so use this to size an enabled scout troop against the project's real daily run budget rather than assuming a value. Read-only and side-effect free.",+ "category": "Signals",+ "feature": "signals",+ "summary": "Get scout enrollment, banner, and run limits",+ "title": "Get scout enrollment, banner, and run limits",+ "required_scopes": ["signal_scout:read"],+ "annotations": {+ "destructiveHint": false,+ "idempotentHint": true,+ "openWorldHint": true,+ "readOnlyHint": true+ }+ },"scout-project-profile-get": {"description": "Return a deterministic snapshot of \"what's true about this project\" — products in use, product intents (stuck onboardings), connected integrations, warehouse sources, signal source configs (split enabled/disabled), and existing inbox report counts. Singleton per team; the response reflects either the newest non-expired cached profile or a freshly-built one. Read this once at the start of a run (right after `skill-get`) to orient on the team in one tool call instead of paginating through `inbox-source-configs-list` / `inbox-reports-list` / `read-data-schema` / `advanced-activity-logs-list`. Distinct from `scout-scratchpad-search`: profile is ground truth from authoritative tables; scratchpad is the scout's inferred learnings.","category": "Signals",diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 518d014a8095..cc2dd195a505 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -3,7 +3,7 @@* MCP service uses these Zod schemas for generated tool handlers.* To regenerate: hogli build:openapi*- * PostHog API - MCP 34 enabled ops+ * PostHog API - MCP 35 enabled ops* OpenAPI spec version: 1.0.0*/import * as zod from 'zod'@@ -550,6 +550,18 @@ export const SignalsScoutMembersListQueryParams = /* @__PURE__ */ zod.object({),})+/**+ * Return the project's scout metadata: whether it is enrolled, the current announcement banner (e.g. an alpha run-limit notice, or null when unset), and the enforced run limits with current usage. Limits reflect what the coordinator actually applies at dispatch, so a user can see the real throttle rather than what they assume they set. All values come from the `signals-scout` flag payload, so the banner and caps can change with no deploy.+ * @summary Get scout metadata+ */+export const SignalsScoutMetadataGetParams = /* @__PURE__ */ zod.object({+ project_id: zod+ .string()+ .describe(+ "Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/."+ ),+})+/*** Return the team's deterministic project profile. For the internal scout token the response reflects the newest non-expired cached row or a freshly-built one (lazy compute on cache miss); `force_refresh=true` skips the cache and rebuilds from authoritative sources. Public read callers (session auth or a `signal_scout:read` PAK) get the newest cached profile, or 404 if none has been built yet — they never trigger a rebuild. Read this at the start of a run to orient on the team's product mix, integrations, warehouse sources, signal coverage, and existing inbox surface.* @summary Get the current project profilediff --git a/services/mcp/src/tools/generated/signals.ts b/services/mcp/src/tools/generated/signals.tsindex b0b30b48319e..9cc5c49a043e 100644--- a/services/mcp/src/tools/generated/signals.ts+++ b/services/mcp/src/tools/generated/signals.ts@@ -752,6 +752,22 @@ const scoutMembersList = (): ToolBase<typeof ScoutMembersListSchema, WithPostHog},})+const ScoutMetadataGetSchema = z.object({})++const scoutMetadataGet = (): ToolBase<typeof ScoutMetadataGetSchema, Schemas.ScoutMetadata> => ({+ name: 'scout-metadata-get',+ schema: ScoutMetadataGetSchema,+ // eslint-disable-next-line no-unused-vars+ handler: async (context: Context, params: z.infer<typeof ScoutMetadataGetSchema>) => {+ const projectId = await context.stateManager.getProjectId()+ const result = await context.api.request<Schemas.ScoutMetadata>({+ method: 'GET',+ path: `/api/projects/${encodeURIComponent(String(projectId))}/signals/scout/metadata/current/`,+ })+ return result+ },+})+const ScoutProjectProfileGetSchema = SignalsScoutProjectProfileGetQueryParamsconst scoutProjectProfileGet = (): ToolBase<typeof ScoutProjectProfileGetSchema, Schemas.ProjectProfile> => ({@@ -1471,6 +1487,7 @@ export const GENERATED_TOOLS: Record<string, () => ToolBase<ZodObjectAny>> = {'scout-emit-report': scoutEmitReport,'scout-emit-signal': scoutEmitSignal,'scout-members-list': scoutMembersList,+ 'scout-metadata-get': scoutMetadataGet,'scout-project-profile-get': scoutProjectProfileGet,'scout-run-now': scoutRunNow,'scout-runs-emission-reports': scoutRunsEmissionReports,diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-metadata-get.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-metadata-get.jsonnew file mode 100644index 000000000000..7b7ea9186078--- /dev/null+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-metadata-get.json@@ -0,0 +1,5 @@+{+ "$schema": "https://json-schema.org/draft/2020-12/schema",+ "properties": {},+ "type": "object"+}