Skip to content

[Capability] Extract shared element name/description resolution - #46

Closed
chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-13-metadata-dedup
Closed

chr-hertel wants to merge 1 commit into
mainfrom
fix/issue-13-metadata-dedup

Conversation

@chr-hertel

Copy link
Copy Markdown
Owner

The $name = ... '__invoke' === $methodName ... / $description = ... derivation was copy-pasted four times in Discoverer::processMethod() and four more in ReflectedElementLoader::load(). Both now consume a single ElementMetadataResolver; the closure-case fallbacks (closure_tool_* etc.) stay inline as before. Behavior unchanged.

The injectable-parameter drift half of the issue (phantom ClientGateway schema property) is fixed separately via #25's PR.

Note: may conflict textually with the #19 refactoring of processMethod()'s switch — this change deliberately leaves the switch structure untouched.

Closes #13

Confidence: 9/10 — pure extraction with identical expressions, full unit suite, php-cs-fixer, and phpstan green; only residual risk is merge conflicts with the parallel #19 branch.

@chr-hertel

Copy link
Copy Markdown
Owner Author

Solved upstream with modelcontextprotocol#481

@chr-hertel chr-hertel closed this Aug 24, 2026
@chr-hertel
chr-hertel deleted the fix/issue-13-metadata-dedup branch August 24, 2026 22:48
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.

[A9] Element metadata knowledge is duplicated three ways and has already drifted

1 participant