Merged database tool style becomes the default for new MCP services - #70
Closed
nicdavidson wants to merge 1 commit into
Closed
nicdavidson wants to merge 1 commit into
nicdavidson wants to merge 1 commit into
Conversation
Prefixed style emits every verb once per database, so five databases produce 80 near-identical tools that bloat client context and confuse tool selection. Merged style registers each verb once with a service argument. - McpServerConfig creating hook sets tool_style=merged when a new row has none; config-schema default and labels updated, prefixed marked legacy. - Existing rows untouched: the tool_style column stays nullable with no backfill, and null still reads as prefixed in the daemon. - README documents the setting and the default. - Source-wiring test covers the hook, schema default, and migration. Closes #65
Contributor
Author
|
Reviewed against the spec in #65: creating-hook default only (existing rows untouched, null still reads prefixed in the daemon), schema default and legacy labelling, no backfill, wiring test covers the hook and the migration's no-write guarantee. Behaviour-change notes match the diff. The 4 daemon test failures are develop's, fixed in #62. Holding the merge until the Tuesday review. |
Contributor
Author
|
Integrated into the team branch |
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
Prefixed style emits every database verb once per database, so five databases produce 80 near-identical tools that bloat client context and confuse tool selection (customer-reported). Merged style (PR #60) registers each verb once with a
serviceargument. Per Nic's 2026-09-18 decision, merged is now the default for new MCP services.McpServerConfig: thecreatinghook setstool_style = 'merged'when a new row has none. The config-schema default becomesmerged; labels are now "Merged with a service argument (default)" / "Prefixed per service (legacy)" and the description explains the trade-off and that existing servers keep prefixed until switched.tool_styleunchanged in behaviour (nullable, no backfill); only its doc comment was updated. Null still reads asprefixedin the daemon.Behaviour changes
Before: A newly created MCP service with no
tool_styleadvertised prefixed tools (3 databases = 58 tools). The admin picklist defaulted to Prefixed.After: A newly created MCP service defaults to merged tools (3 databases = 26 tools, each verb once with a
serviceargument). The admin picklist defaults to Merged and labels Prefixed as legacy.Upgrade impact: None for existing services. Rows created before this change keep their stored style; a null column still reads as prefixed in the daemon, so no existing client sees renamed tools. Admins creating new services who need prefixed names must pick "Prefixed per service (legacy)" explicitly.
How verified:
tests/Unit/MergedToolStyleDefaultTest.phpasserts the creating hook only fillstool_stylewhen empty and that no saving/updating hook rewrites it, the schema default and labels, and that the migration has no->default(,DB::, or->update(backfill. df-core'sstoreConfigusesfirstOrNew+save, so thecreatinghook fires for new rows only.Testing
df-development-web-1against this checkout):OK (183 tests, 619 assertions).cd daemon && npm test: 7 pass, 4 fail. The 4 failures are the lazy facade tests on develop that expect the old four-tool facade;daemon/is byte-identical toorigin/developon this branch and PR test(daemon): expect list_tools in the lazy facade catalog #62 already fixes them.Closes #65