feat(mcp): reduce noise in MCP tools — strip nulls, fix bugs, unify errors - #478
Merged
Conversation
RawSourceConfig non aveva il campo extractor, quindi l extractor definito nel source YAML (es. unzip_first_csv) veniva silenziosamente droppato durante il parsing.
…e) - RC1 foundation for noise reduction
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.
Riduzione rumore nei tool MCP per AI agenti
9 commit che migliorano l'UX dei tool MCP per AI: meno token sprecati, errori uniformi, bug fixes.
Bug fixes
return {"error": ...}sostituiti conraise ToolkitClientError(...)— logging uniforme via guard_timedfilter_graph(by_dataset=...)ora filtra anche i bridge, non solo le entitàNoise reduction
shape()utility: strip_nulls + strip_empty_lists applicati a find, overview, preview, probe, status, preflighttoolkit_contracteliminato: duplicato identico ditoolkit_pipeline(action='contract')statusdroppapaths_info: sezione sovrapposta con summary rimossapreflightstrip nulls: ogni source entry pulita dai campi nullproberouted=True di default: meno parametri da ricordare, routing automatico sempre attivoOutput prima/dopo (char count)
Test
77/77 test passano (test_mcp_server + test_mcp_toolkit_client + test_registry_graph).
File changed
toolkit/mcp/response.py— nuove utility (strip_nulls, compact, shape)toolkit/mcp/server.py— error handling, shape application, remove toolkit_contracttoolkit/registry/graph.py— by_dataset bridge filteringtests/test_mcp_server.py— test aggiornati per nuovi error patternstests/test_registry_graph.py— test per bridge filtering