P12-T2: Add Tool Parameter Frequency Analysis#54
Merged
SoundBlaster merged 8 commits intoFeb 16, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds opt-in tool parameter frequency analysis to the XcodeMCPWrapper Web UI. When
capture_params: trueis set in the metrics config, the wrapper records the sorted key names (never values) of each tool call'sargumentsobject. A new API endpoint and expandable dashboard UI show the most common parameter key combinations per tool.Key changes:
WebUIConfig: newcapture_paramsflag (defaultFalse)MetricsCollector:record_param_keys()/get_param_patterns()with in-memory dict storageSharedMetricsStore: newparam_patternsSQLite table with UPSERT;record_param_keys()/get_param_patterns()server.py: newGET /api/analytics/param-patterns?tool=<name>&top_n=10endpoint__main__.py: extracts argument keys fromMCPRequest.params.argumentswhen flag enableddashboard.js: expandable chevron rows in the Per-Tool Latency table; fetches patterns on demanddashboard.css: styles for toggle button and param patterns sub-tableFU-P12-T2-1added to workplan: fix stacking click listeners inupdateLatencyTableType of Change
Quality Gates
make test- All tests pass with ≥90% coverage (457 passed, 95.95% coverage)make lint- No linting errors (ruff check src/clean)make format- Code is properly formattedmake typecheck- Type checking passes (mypy src/clean, 13 files)make doccheck- Documentation is synced with DocC (if docs changed)Documentation Sync
Testing
TestParamPatternsintest_metrics.pytest_shared_metrics.pyTestParamPatternsEndpointintest_server.pycapture_paramsconfig flag intest_config.pyChecklist