Skip to content

fix(tools): align tool handler names with registration names#62

Closed
echobt wants to merge 2 commits intodocs/standardize-timeout-documentationfrom
fix/tool-handler-name-consistency
Closed

fix(tools): align tool handler names with registration names#62
echobt wants to merge 2 commits intodocs/standardize-timeout-documentationfrom
fix/tool-handler-name-consistency

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Feb 4, 2026

Problem

Tool handler names were inconsistent with their registration names in router.rs:

  • WriteFileHandler.name() returned "Write" but was registered as "Create"
  • SearchFilesHandler.name() returned "search_files" (snake_case) but was registered as "SearchFiles" (PascalCase)

This inconsistency causes confusion in tool routing and logging, as the handler reports a different name than what it is registered under.

Solution

Aligned the name() return values with the registration names:

  • WriteFileHandler.name() now returns "Create"
  • SearchFilesHandler.name() now returns "SearchFiles"

Changes

  • Updated WriteFileHandler::name() to return "Create" instead of "Write"
  • Updated SearchFilesHandler::name() to return "SearchFiles" instead of "search_files"

Testing

Verified compilation with cargo check -p cortex-engine.

echobt added a commit that referenced this pull request Feb 4, 2026
This PR consolidates the following tools fixes:
- #53: Add serde alias for Glob tool folder parameter
- #62: Align tool handler names with registration names
- #63: Add serde alias for Grep tool head_limit parameter

Key changes:
- Added serde aliases for backward compatibility
- Fixed mismatched handler names to match tool registration
- Improved tool parameter handling consistency
@echobt
Copy link
Contributor Author

echobt commented Feb 4, 2026

Consolidated into #75 - fix(tools): consolidated tools parameter aliases and handler name fixes

@echobt echobt closed this Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant