skills/improving-mcp-tools/SKILL.md
Run an improve-my-MCP campaign: an autoresearch-style loop that measures the MCP agent experience with the eval harness, picks the highest-impact tool problem from production data, makes one bounded fix, and keeps it only if before/after scores improve. Use when asked to "improve my MCP", run an MCP improvement campaign, fix tool discoverability or descriptions based on evidence, or prepare an eval-backed PR for a tool change. Every shipped change must carry eval evidence; guardrails below are hard rules.
npx skillsauth add posthog/ai-plugin improving-mcp-toolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
An MCP server gets better only in ways you can measure. This skill is the campaign procedure: score the current agent experience, fix the biggest problem, re-score, and only ship changes the numbers justify. It is the operating manual for the "improve my MCP" loop — one iteration per pass, journaled so a later iteration (or a different agent) can resume without repeating work.
services/mcp/evals/ is the harness. benchmark/tasks.yaml is a fixed set of
agent tasks with expected_tools and success_criteria; scores are only
comparable across runs of the same benchmark version.
LIVE_MCP_URL=... LIVE_MCP_TOKEN=... pnpm exec tsx evals/runner/probe.ts --out score.json
from services/mcp/. Reports tool-presence misses (discoverability), probe
failures, and latency p50/p95. Non-zero exit = regression.Run the harness against a seeded local or devbox stack, never against a
customer project. Local recipe: NODE_ENV=development PORT=9876 POSTHOG_API_BASE_URL=http://localhost:8000 pnpm dev:hono, personal API key as
LIVE_MCP_TOKEN.
query-mcp-tool-stats, query-mcp-tool-failures,
query-mcp-tool-descriptions, query-mcp-tool-sample-intents) and the
lenses in the signals scout cookbook
(products/signals/skills/signals-scout-mcp-tool-calls/references/queries.md):
failure leaderboard, retry/struggle, latency, intents that matched no tool.stamphog label. Autonomy level comes from the campaign config —
default is draft PR for human review; only arm auto-merge when the
operator has explicitly enabled the self-driving experiment (see
guardrails).These are not suggestions; violating any of them ends the campaign pass.
products/*/mcp/tools.yaml,
products/*/skills/**, services/mcp/evals/**, the codegen outputs of
pnpm generate-tools / scaffold-yaml (services/mcp/src/tools/generated/**
and services/mcp/schema/generated-tool-definitions.json), and docs.
Anything else (handler code, package manifests, workflows, migrations, auth
paths) → stop and hand the finding to a human as a draft PR or report
instead.benchmark/tasks.yaml in the same PR as
a fix it validates — changing the exam and the answer together proves
nothing. Benchmark changes are their own PR and bump version.getToolsForFeatures gating before "fixing" discoverability.data-ai
Signals scout for PostHog Tasks, the agent work items a project runs. Two lenses: delivery health (runs failing, clustered by repository and error class, and retry storms) every run, and on a slower rotation demand (recurring asks across human-authored tasks that point at a product gap). Skips the scout fleet's own run rows.
devops
Signals scout for the PostHog Conversations (support inbox) product. Watches the `$conversation_*` ticket-lifecycle events for support-delivery regressions — SLA breach-rate steps, first-response latency blowouts, backlog inflow-vs-resolution imbalance, and channel / assignment concentration — and files each dated regression as a report. Complements the per-ticket product-feedback signals the emission pipeline already fires; does not re-surface individual ticket content.
development
Populates and maintains a project's data catalog (semantic layer): canonical metrics, trust marks (certifications) on warehouse tables/views, and reviewed table relationships. Use when asked to set up / seed / bootstrap the data catalog or semantic layer, to catalog a project's metrics, to certify or deprecate data sources, to propose or review table joins, or to work through the proposal review queue. To *use* an existing catalog to answer a business-number question, see querying-posthog-data instead. Trigger terms: data catalog, semantic layer, canonical metric, certify table, deprecate source, relationship proposal, metric drift, review queue.
tools
Investigate logs in a PostHog project: verify a service or deployment is healthy, explain an error spike, triage an incident, or understand what a log stream is saying. Use when the user asks to "check the logs", asks whether a service, deploy, release, or change is working or broke anything, asks why errors are up or what changed, or wants the root cause of failures visible in logs. Routes the logs MCP tools (services overview, pattern mining, before/after pattern diffing, bucketed counts, facets, raw rows) so investigations start from summaries instead of raw rows or hand-written SQL over the logs table.