feat(mcp): add compact descriptor mode#43
Merged
Conversation
Keep verbose meta-tool descriptions as the default while allowing clients to opt into shorter MCP descriptors for context-sensitive environments.
ScottRBK
approved these changes
May 10, 2026
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
MCP_DESCRIPTOR_MODE=compactfor shorter MCP meta-tool descriptions.verboseas the default so existing users retain the current inline guidance.Why
Some MCP clients load tool descriptions into the model context at startup. Forgetful already uses the right meta-tool pattern, but the
discover_forgetful_toolsandexecute_forgetful_tooldescriptions embed long examples and catalogs. Compact mode lets context-sensitive clients keep those descriptors small while still fetching full schemas/examples on demand viahow_to_use_forgetful_tool.Validation
uv run pytest tests/integration/test_meta_tools_docstrings.py-> 25 passed.uv run python -m compileall app/routes/mcp/meta_tools.py app/config/settings.py-> passed.main.mcp.list_tools()-> 3 tools, 1,442 total description chars (discover506,how_to_use321,execute615).uv run pytest tests/e2e_sqlite/test_meta_tools_sqlite.pywas attempted but blocked during setup because FastEmbed attempted a HuggingFace model download and the remote connection was closed.Compatibility
MCP_DESCRIPTOR_MODE=verbose.verbose.