Progressive disclosure of tools and dynamic DB-defined objects#282
Merged
Progressive disclosure of tools and dynamic DB-defined objects#282
Conversation
…e_readQuery-based tools
Resolves conflicts preserving both feature sets: - Progressive disclosure of tools (this branch) - Dynamic DB-defined objects via registry (this branch) - SHOW command DDL extraction (main) - Ruff formatting / snake_case renames (main) - CI workflow, CLAUDE.md, auth improvements (main) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix curly quotes (U+201C/U+201D) in base_tools.py introduced during merge
- Fix search_tool to return standard {"status":"success","results":...} JSON
envelope so the test runner can parse it correctly
- Add base_readQuery persist=True test case to core_test_cases.json
- Add progressive_disclosure_test_cases.json covering search_tool (list,
exact match, keyword search) and execute_tool (readQuery, tableList,
databaseList)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix UP035: replace deprecated typing.Dict/List/Set/Tuple/Optional imports with built-in types - Fix SIM105: use contextlib.suppress instead of try-except-pass - Fix SIM108: convert if-else blocks to ternary operators - Fix SIM118: remove redundant .keys() in dict iteration - Fix SIM222: simplify 'param_defs or True' to 'True' - Fix B007: rename unused loop variables to _i, _tool_name - Fix E721: use 'is' instead of '==' for type comparisons - Fix mypy: correct on_initialize return type signature - Fix mypy: add Optional annotation for arguments parameter - Fix mypy: add type annotation for params_by_tool dict - Fix mypy: handle None safety for sql.rstrip() - Add PLR2004 to ruff ignore (magic values in row index access patterns) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
--progressive_disclosureCLI flag.ContextCataloglayer routes tool discovery through categories (base, dba, bar, etc.) enabling staged exposure.on_initializeinRequestContextMiddlewaretriggers registry refresh on each new client session.base_readQuerygains apersistparameter to materialize large result sets as volatile tables for reuse.Key new files
src/teradata_mcp_server/tools/context_catalog.py— tool catalog with progressive disclosure logicsrc/teradata_mcp_server/tools/registry/— DB-backed tool registry loader and toolssrc/teradata_mcp_server/tools/utils/factory.py— unified async MCP tool factoryexamples/server-customisation/registry_setup.sql— SQL to set up the registry schemadocs/developer_guide/PROGRESSIVE_DISCLOSURE.md/REGISTRY_IMPLEMENTATION.mdTest plan
--progressive_disclosureflag and verify tools are exposed incrementallybase_readQuerywithpersist=Trueand verify volatile table is created and sampled🤖 Generated with Claude Code