fix(mcp): Apply parameters override in _apply_tool_overrides#549
Open
prince-shakyaa wants to merge 1 commit into
Open
fix(mcp): Apply parameters override in _apply_tool_overrides#549prince-shakyaa wants to merge 1 commit into
parameters override in _apply_tool_overrides#549prince-shakyaa wants to merge 1 commit into
Conversation
parameters override in _apply_tool_overrides
parameters override in _apply_tool_overridesparameters override in _apply_tool_overrides
parameters override in _apply_tool_overridesparameters override in _apply_tool_overrides
Author
|
This PR resolves #547 where parameter schema overrides stored via the Dark Lab supply-chain API were being silently discarded by the agent runtime. I updated Let me know if you need any changes. Thank You. |
prince-shakyaa
force-pushed
the
fix/mcp-tool-override-schema-fix
branch
from
July 23, 2026 17:02
96cd2a8 to
78c38d1
Compare
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.
fix (mcp): Apply
parametersoverride in_apply_tool_overridesFixes #547
What changed
finbot/mcp/factory.py-_apply_tool_overridesPreviously the function only read
descriptionfrom each tool override entry and silently discarded anyparameters/inputSchemablock the caller had stored.This PR widens the implementation to also apply the parameter schema when one is present in the override dict.
Why
The
PUT /darklab/api/v1/supply-chain/servers/{server_type}/toolsendpoint accepts and persists arbitrary JSON per tool (includingparameters), the Dark Lab UI displays the full stored object, and the supply-chain stats endpoint counted parameter-bearing overrides as "poisoned tools" -- but the agent runtime never saw the changed schema. This created a silent mismatch between what was stored and what was actually active.Changes
finbot/mcp/factory.pyBehaviour preserved
if not (new_description or new_parameters): continueguard means entries with neither key are skipped, same as before.parameters(Dark Lab UI key) andinputSchema(FastMCP native key) interchangeably.Testing
Run the existing dark lab route security tests to confirm nothing regresses:
Manual verification:
descriptionandparametersforfinmail/send_emailsend_emailbccfield is now known to the LLM)