Feature request(MCP Analytics): Tool Call Paths
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Feature request
Is your feature request related to a problem?
MCP Analytics captures individual tool calls, but it is hard to understand how tools are used together in a real agent workflow.
Tool-level metrics show usage, latency, and errors, but they do not reveal common sequences, repeated loops, slow paths, or combinations that frequently fail.
Describe the solution you'd like
Add a Tool Paths insight for MCP Analytics.
It should show the most common MCP tool call sequences across related tool calls, ordered by timestamp. The first version can group paths by $mcp_session_id, with future support for grouping by conversation, user, client, or inferred intent.
Useful metrics per path could include:
- Number of occurrences
- Average duration
- Error rate
- Most common MCP clients
- Tools involved
It should help answer questions like:
- Which tool combinations are most common?
- Which paths are slowest?
- Which paths error the most?
- Are agents looping through the same tools?
- Which tool combinations could be consolidated or optimized?
Describe alternatives you've considered
Users can manually inspect individual tool calls or build custom queries, but that does not easily show ordered workflows across related calls.
A simpler first version could be a “top tool sequences” table before building a full visual paths insight.
Additional context
This would help MCP server owners understand real agent workflows and spot opportunities to optimize, consolidate, or redesign tools.
For example, if agents often call:
search_docs → read_doc → search_docs → read_doc → create_issue
we may want to improve the flow or add a higher-level tool that handles the repeated sequence.
Part of: #64016
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the parent issue #64016 and the linked Slack discussion for context on MCP Analytics. Define the first version around timestamp-ordered tool sequences grouped by $mcp_session_id, with the proposed path metrics. Done means the scope and acceptance criteria for a Tool Paths insight are agreed, including the simpler top-sequences table alternative.
Written by the indexing model from the issue text.
Assessment
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100