New to Claude Skills? Learn how to install them →

posthog on GitHub

Exploring MCP Tool Usage

Free

Analyze and understand your MCP tool usage effectively.

Get this skill

Free · Opens the source repo

What Exploring MCP Tool Usage does

The Exploring MCP Tool Usage skill is designed for users of PostHog's MCP servers who want to gain insights into how their tools are being utilized. This skill acts as an entry point for users who may have broad questions about their MCP tool performance but are unsure where to start. By providing a structured menu of relevant questions, it routes users to the appropriate analytics tools that can provide detailed answers. This is particularly useful for developers and data analysts looking to optimize their tool usage and improve overall performance.

When a user initiates an inquiry, such as 'how is my MCP doing?' or 'who uses my MCP tools?', the skill presents a series of suggested questions that can be explored further. Each question is linked to specific queries that leverage the PostHog MCP SDK's capabilities, allowing users to obtain detailed analytics without needing to write complex queries themselves. The skill ensures that the results are consistent with the PostHog tool-detail UI, making it easier for users to interpret their findings.

This skill is particularly beneficial for teams managing multiple tools within an MCP environment, as it helps identify trends, issues, and user engagement with various tools. By using this skill, users can quickly pinpoint areas that may need attention, such as tools that are frequently failing or those that have low usage rates. This proactive approach can lead to improved tool reliability and better user experiences.

Overall, the Exploring MCP Tool Usage skill is an essential tool for anyone looking to enhance their understanding of tool performance within the PostHog MCP framework. It streamlines the process of obtaining valuable insights, making it easier for teams to make data-driven decisions about their tool usage and management.

When to use it

Use this skill when you have general questions about your MCP tool performance and need guidance on where to look for answers.

When not to use it

This skill may not be suitable for users who need highly customized analytics or who are looking to perform complex SQL queries directly.

What you can build with it

Analyzing Tool Performance

Use this skill to identify which tools are underperforming or experiencing failures, allowing for targeted improvements.

Understanding User Engagement

Explore who is using your MCP tools the most and how frequently, helping to inform user support and training efforts.

Tracking Tool Trends Over Time

Monitor the performance of specific tools over time to identify trends and make data-driven decisions about tool management.

How to install Exploring MCP Tool Usage

View source

1. Install with the skills CLI

npx skills add posthog/posthog/exploring-mcp-tool-usage --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by posthog

Exploring MCP tool usage

Any MCP server instrumented with the @posthog/mcp SDK emits a $mcp_tool_call event every time an agent invokes a tool. This skill is the front door for a user who knows they want to look at their MCP tool usage but hasn't picked a specific question. Offer the menu below, then route to the tool — or the focused skill — that answers what they choose.

Every per-tool tool here is gated behind the mcp-analytics flag, takes a toolName (the effective tool name — resolved server-side, so pass the name the agent actually invokes — except posthog:query-mcp-tool-failures, which matches $exception events and so takes the raw registered $mcp_tool_name) plus a dateRange, and runs the same query runner the tool-detail UI uses. So results match the UI, and you never hand-write the HogQL.

Suggested questions

Lead with these when the user is unsure what to ask:

Ask the user…Answered by
"Which tools fail most, or are slowest?"exploring-mcp-tool-quality (ranks all tools), then posthog:query-mcp-tool-stats to drill in
"How is tool X doing overall?"posthog:query-mcp-tool-stats — calls, errors, p50/p95, users, sessions, intents
"How has tool X trended?"posthog:query-mcp-tool-daily-stats — day-by-day series
"Why is tool X failing?"posthog:query-mcp-tool-failures — top error messages, by harness (raw tool name)
"Who uses tool X the most?"posthog:query-mcp-tool-top-users — top callers (incl. person email/name)
"What gets called right before/after tool X?"posthog:query-mcp-tool-neighbors (neighborDirection: before/after)
"What are agents trying to do with tool X?"posthog:query-mcp-tool-sample-intents — recent agent intents
"What description is tool X registered with?"posthog:query-mcp-tool-descriptions — distinct descriptions seen
"Which harnesses use my MCP, how reliably?"posthog:query-mcp-harness-breakdown — calls/errors/sessions per client
"What are agents trying to do, across all tools?"exploring-mcp-intent-clusters — semantic goal clusters
"Who is connecting, and how active are they?"posthog:mcp-analytics-sessions-list — one row per session, with client and person
"What did this one session do?"exploring-mcp-sessions — a single agent run's tool sequence

Finding the tool name

The per-tool tools need a toolName. If the user named a tool, pass it. If they asked a broad "which tool…" question, start with exploring-mcp-tool-quality to rank the tools, pick the one that stands out, then drill in with the per-tool tools above. The name to pass is the effective tool name (the inner tool for single-exec wrapper calls) — the same string the tool-quality ranking returns. The one exception is posthog:query-mcp-tool-failures, which matches $exception events by the raw registered $mcp_tool_name, not the effective inner tool.

How to use a per-tool tool

Call it with the tool name and a window, e.g. for the headline numbers of a tool:

posthog:query-mcp-tool-stats  { "toolName": "<tool>", "dateRange": { "date_from": "-7d" } }

Then offer a natural follow-up from the menu — e.g. after posthog:query-mcp-tool-stats shows a high error rate, reach for posthog:query-mcp-tool-failures; after it shows broad reach, reach for posthog:query-mcp-tool-top-users or posthog:query-mcp-tool-neighbors.

When to drop to SQL

Covered by a typed tool — don't hand-write SQL for these:

QuestionTool
One tool's headline numbersposthog:query-mcp-tool-stats
One tool's day-by-day trendposthog:query-mcp-tool-daily-stats
One tool's top errorsposthog:query-mcp-tool-failures
One tool's top callersposthog:query-mcp-tool-top-users
Tools called before/after one toolposthog:query-mcp-tool-neighbors
One tool's recent agent intentsposthog:query-mcp-tool-sample-intents
One tool's registered descriptionsposthog:query-mcp-tool-descriptions
Usage split by client harnessposthog:query-mcp-harness-breakdown
List sessionsposthog:mcp-analytics-sessions-list
One session's tool callsposthog:mcp-analytics-sessions-tool-calls

Not covered — use posthog:execute-sql:

  • Cross-tool rankings (the tool-quality matrix — "which tool errors most?")
  • Errored-session filtering (the session list has no error filter or error count)
  • Effective tool names inside a session (posthog:mcp-analytics-sessions-tool-calls returns the raw $mcp_tool_name, not the inner tool of a wrapper call)
  • Any custom breakdown

posthog:execute-sql is also the fallback when the mcp-analytics flag is off — every tool in the table above is gated behind it, execute-sql is not. Query $mcp_tool_call directly; the schema and recipes are in models-mcp.md.

Related skills

Frequently asked questions about Exploring MCP Tool Usage

Similar skills