Skip to content

ROB-232: add site-native WebMCP challenge tools - #177

Merged
robertn702 merged 2 commits into
mainfrom
agent/fullstack-engineer/dcdb7ca59762
Aug 30, 2026
Merged

robertn702 merged 2 commits into
mainfrom
agent/fullstack-engineer/dcdb7ca59762

Conversation

@robertn702

@robertn702 robertn702 commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • register search_packages, get_package, compare_packages, and verify_site_tools directly on every webmcp.today page
  • align the registration path with ChatGPT WebMCP: initialize before React hydration, call registerTool(descriptor) with one argument, and return plain JSON values
  • validate tool inputs and registry responses, isolate registration failures, mark package-derived content untrusted, and avoid sending URL credentials/query secrets/fragments
  • add full-registry text search before pagination
  • add the challenge baseline tag documentation, dated NEW-WORK.md, judge test instructions, sample prompts, self-sufficiency statement, and mixed-license note

Meaningful files

  • apps/web/lib/site-tools.ts: site-native tool descriptors, plain JSON execution, validation, and registration
  • apps/web/instrumentation-client.ts: pre-hydration site-tool initialization before Sentry
  • apps/web/lib/package-query.ts: bounded search and filter-before-pagination contract
  • apps/web/app/api/packages/route.ts: public q parameter
  • apps/web/test/site-tools.test.ts, apps/web/test/packages-route-search.test.ts, apps/web/test/packages-query.test.ts: focused contract and integration coverage
  • README.md, NEW-WORK.md: judge and eligibility evidence

Verification

  • bun run --filter @webmcp-today/web test -- test/site-tools.test.ts test/packages-query.test.ts test/packages-route-search.test.ts - passed, 9 tests across 3 files
  • bun run typecheck - passed, 9/9 tasks
  • bun run lint - passed
  • scoped bunx prettier --check - passed
  • git diff --check - passed
  • final reviewer-light review - approved with no findings
  • bun run test - all scoped tests pass; the unchanged packages/mcp/test/native-host-bun.test.ts still fails with connect ENOENT and this PR does not modify packages/mcp

Remaining acceptance gates

  • retry all four tools on the refreshed Vercel preview in ChatGPT desktop after commit 8324d0f deploys
  • invoke all four tools in Chrome 149+ with WebMCP testing enabled and attach judge evidence to ROB-232
  • merge and verify the production deployment before marking the issue ready for review

Closes ROB-232

Summary by CodeRabbit

  • New Features

    • Added four read-only WebMCP tools for searching, viewing, comparing, and verifying registry packages.
    • Added package search with case-insensitive matching across package and tool details.
    • Added validation for search queries up to 200 characters.
    • Tools are registered before the app loads for improved availability.
  • Documentation

    • Added testing instructions, sample prompts, eligibility details, and licensing information.
  • Tests

    • Added coverage for package search, pagination, API validation, and WebMCP tool behavior.

@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webmcp-today Ready Ready Preview Aug 30, 2026 5:52pm

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8ce544a3-5d5e-4763-9d71-bf92c202ef1b

📥 Commits

Reviewing files that changed from the base of the PR and between 60e3660 and 8324d0f.

📒 Files selected for processing (10)
  • NEW-WORK.md
  • README.md
  • apps/web/app/api/packages/route.ts
  • apps/web/instrumentation-client.ts
  • apps/web/lib/package-query.ts
  • apps/web/lib/packages-repo.ts
  • apps/web/lib/site-tools.ts
  • apps/web/test/packages-query.test.ts
  • apps/web/test/packages-route-search.test.ts
  • apps/web/test/site-tools.test.ts

📝 Walkthrough

Walkthrough

The change adds bounded package search, four read-only WebMCP tools, pre-hydration registration, validation, focused tests, and challenge documentation.

Changes

WebMCP registry integration

Layer / File(s) Summary
Package search and pagination
apps/web/lib/package-query.ts, apps/web/lib/packages-repo.ts, apps/web/app/api/packages/route.ts, apps/web/test/packages-query.test.ts, apps/web/test/packages-route-search.test.ts
The packages API accepts trimmed q values up to 200 characters. Repository results are filtered across package and tool metadata before pagination. Tests cover matching, pagination, forwarding, and rejection.
Site tool definitions and registration
apps/web/lib/site-tools.ts, apps/web/instrumentation-client.ts, apps/web/test/site-tools.test.ts, README.md, NEW-WORK.md
The site defines search_packages, get_package, compare_packages, and verify_site_tools with validated inputs, read-only annotations, registry requests, error handling, model-context fallback, and pre-Sentry registration. Tests and documentation cover the tool behavior and challenge setup.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ModelContext
  participant registerSiteTools
  participant SiteTool
  participant RegistryAPI
  ModelContext->>registerSiteTools: expose registerTool
  registerSiteTools->>SiteTool: create and register four tools
  SiteTool->>RegistryAPI: request package data
  RegistryAPI-->>SiteTool: return validated response
  SiteTool-->>ModelContext: return read-only result
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/fullstack-engineer/dcdb7ca59762

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@robertn702
robertn702 marked this pull request as ready for review August 30, 2026 18:31
@robertn702
robertn702 merged commit c65a11a into main Aug 30, 2026
6 of 7 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8324d0fa Deployed Aug 30, 2026 by vercel[bot]
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