Fix(chat): remove internal MCP tool name from VendorChatAssistant RULES#473
Open
Jean-Regis-M wants to merge 1 commit intoGenAI-Security-Project:mainfrom
Open
Fix(chat): remove internal MCP tool name from VendorChatAssistant RULES#473Jean-Regis-M wants to merge 1 commit intoGenAI-Security-Project:mainfrom
Jean-Regis-M wants to merge 1 commit intoGenAI-Security-Project:mainfrom
Conversation
Root cause: CAPABILITIES describes FinDrive in plain language but RULES explicitly names findrive__get_file, creating inconsistent abstraction levels. Solution: Replace explicit tool name with generic "appropriate file reading tool" to match plain-language convention used in CAPABILITIES. Impact: - No behavioral change (LLM still uses MCP dispatch internally) - No breaking changes - Aligns with CoPilotAssistant plain-language pattern - test_chat_prompt_055 (no internal name leakage) now passes Signed-off-by: JEAN REGIS <240509606@firat.edu.tr>
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
Fixes #444 Removes internal MCP tool name
findrive__get_filefrom RULES section inVendorChatAssistant._get_system_prompt(), establishing consistent plain-language abstraction across CAPABILITIES and RULES.Problem
The Vendor prompt has inconsistent abstraction levels for the same capability:
"Browse, search, and read files stored in FinDrive""read them using the findrive__get_file tool"This creates ambiguity for developers maintaining the prompt (no clear convention for when tool names appear) and violates
test_chat_prompt_055which prohibits internal tool name leakage.Root Cause
The prompt evolved organically without a governing convention. CAPABILITIES was written for user comprehension (plain language), while RULES was written for tool dispatch instruction (implementation detail). CoPilotAssistant already follows the correct plain-language-only pattern.
Solution
Single-line change Replace explicit
findrive__get_filewith generic"the appropriate file reading tool"in line 517.This:
test_chat_prompt_055(no internal name leakage)Impact
Testing
"findrive__get_file" not in prompt→ PASS"appropriate file reading tool" in prompt→ PASSpytest tests/test_chat_prompt_055.py -v→ PASSpytest tests/test_chat.py→ PASS (no behavioral change)Tasks Done
findrive__get_filefrom line 517"the appropriate file reading tool"test_chat_prompt_055passes after change_mcp_provider)PR Verification Checklist