-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
Description
The VeIdentityMcpToolset class redundantly implements functionality already provided by the parent class BaseToolset. More critically, the tool name prefix implementation contains a bug: the code modifies the _name attribute, but the actual effective attribute is name (class attribute), causing the prefix feature to completely fail.
Code Locations
- File:
veadk/integrations/ve_identity/mcp_toolset.py - Relevant lines: L95-L99, L152-L153, L156-L170
Specific Issues
1. 🔴 Critical Bug: Incorrect tool name prefix implementation (L152-L153)
# Current implementation (Bug)
if self._tool_name_prefix:
mcp_tool._name = f"{self._tool_name_prefix}{mcp_tool.name}"Problem:
- In
BaseTool,nameis a class attribute (base_tool.py#L45), and the instance attribute is alsoself.name - The code modifies
_name(single underscore), but the actual tool uses thenameattribute - This causes the prefix feature to completely fail
Verification:
# In BaseTool
class BaseTool(ABC):
name: str # Class attribute
"""The name of the tool."""
def __init__(self, *, name, ...):
self.name = name # Instance attribute is name, not _name2. Redundant storage of tool filter and prefix attributes (L95-L99)
# Current implementation (redundant)
self._tool_filter = tool_filter
self._tool_name_prefix = tool_name_prefixProblem: These two attributes are already stored in the parent class BaseToolset.__init__() as self.tool_filter and self.tool_name_prefix. This uses underscore prefix to redundantly store them.
3. Completely duplicate _is_tool_selected method (L156-L170)
Problem: This method is identical to the parent class BaseToolset._is_tool_selected() implementation, which is completely redundant code.
Impact
- 🔴 Feature failure: Tool name prefix feature completely doesn't work
- Code redundancy: Same logic implemented in multiple places, increasing maintenance burden
- Risk of inconsistent behavior: If parent class logic is updated, the child's duplicate implementation may miss synchronization
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels