Skip to content

Conversation

@chr-hertel
Copy link
Member

Close #137

@chr-hertel chr-hertel added the Server Issues & PRs related to the Server component label Nov 7, 2025
@chr-hertel chr-hertel requested review from Copilot and removed request for CodeWithKyrian and Nyholm November 7, 2025 18:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements tool name validation according to the SEP-986 specification. The validation ensures tool names contain only allowed characters (a-z, A-Z, 0-9, dots, hyphens, underscores, forward slashes) and do not exceed 64 characters in length.

Key changes:

  • Added a NameValidator class to validate tool names against the SEP-986 specification
  • Integrated validation into the Registry to log warnings for invalid tool names
  • Standardized debug message formatting to use double quotes instead of single quotes

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Capability/Tool/NameValidator.php New validator class implementing tool name validation with regex pattern
src/Capability/Registry.php Integrated name validator and standardized logging message format
tests/Unit/Capability/Tool/NameValidatorTest.php Comprehensive test coverage for valid and invalid tool name cases
tests/Unit/Capability/Registry/RegistryTest.php Updated test expectations to match new quote format in log messages
tests/Inspector/InspectorSnapshotTestCase.php Removed unnecessary type hint comment
phpstan.dist.neon Added exception for missing iterable value types in tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chr-hertel chr-hertel force-pushed the feat-tool-name-validation branch from beafd6d to 964d7a3 Compare November 7, 2025 18:28
Comment on lines +18 to +21
-
identifier: missingType.iterableValue
path: tests/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is addressing array shapes for DataProvider methods in tests - i don't think there is any value in defining them since it is only PHPUnit consuming those arrays not user land code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Server][SEP-986] Specify Format for Tool Names

2 participants