Skip to content

fix: shorten tool names for client limits#265

Open
Torch4084 wants to merge 1 commit intotadata-org:mainfrom
Torch4084:torch4084/limit-tool-names
Open

fix: shorten tool names for client limits#265
Torch4084 wants to merge 1 commit intotadata-org:mainfrom
Torch4084:torch4084/limit-tool-names

Conversation

@Torch4084
Copy link

Summary

  • shorten generated tool names when the configured MCP server name would push clients past the 60-character combined limit
  • preserve deterministic names using a hash suffix and update operation_map to use the shortened names
  • add regression tests for both tool registration and tool execution with shortened names

Fixes #64

Validation

  • uv run ruff check fastapi_mcp/server.py tests/test_configuration.py tests/test_mcp_execute_api_tool.py
  • uv run pytest --no-cov tests/test_configuration.py tests/test_mcp_execute_api_tool.py

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.

Combined Server and tool name should not exceed 60 characters

1 participant