Skip to content

fix(hosted-mcp): use exact text matching in callTool helper#41

Merged
hifi-phil merged 1 commit intodevfrom
fix/call-tool-exact-match
Apr 8, 2026
Merged

fix(hosted-mcp): use exact text matching in callTool helper#41
hifi-phil merged 1 commit intodevfrom
fix/call-tool-exact-match

Conversation

@hifi-phil
Copy link
Copy Markdown
Contributor

Summary

  • callTool() in the hosted testing package uses page.getByText(toolName) which matches tool descriptions containing the tool name as a substring
  • With 81+ tools, this causes Playwright strict mode violations (e.g. "list-children" matches both the tool name and bulk-publish's description "Lists all page names...")
  • Fix: add { exact: true } and .first() to the selector

Test plan

  • Run hosted e2e tests with 80+ tools — no more strict mode violations
  • Verify callTool still clicks the correct tool in the Inspector

🤖 Generated with Claude Code

page.getByText(toolName) matched tool descriptions containing the tool
name as a substring, causing strict mode violations with many tools.
Adding { exact: true } and .first() prevents ambiguous matches.

Co-Authored-By: Claude <noreply@anthropic.com>
@hifi-phil hifi-phil merged commit dc19895 into dev Apr 8, 2026
7 checks passed
@hifi-phil hifi-phil mentioned this pull request Apr 8, 2026
7 tasks
hifi-phil added a commit that referenced this pull request Apr 8, 2026
feat: add cursor-based pagination decorator for MCP tools (feat: add cursor-based pagination decorator for MCP tools #40)
fix(hosted-mcp): use exact text matching in callTool helper (fix(hosted-mcp): use exact text matching in callTool helper #41)
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