Repository navigation
[Enhancement]: Improve AI discovery, crawler indexing, and browser-agent integration (WebMCP, ChatGPT, Claude, Gemini) #4408
Copy link
Copy link
Open
Labels
[Type] EnhancementNew feature or requestNew feature or request
Description
Describe the solution you'd like
Building on our initial llms.txt setup (#3534) and WebMCP (document.modelContext) support (#3844, #4301), we should improve AI discovery, crawler indexing, structured metadata, and browser-agent integrations across WordPress Playground Web (playground.wordpress.net, my.wordpress.net) and the Documentation site (wordpress.github.io/wordpress-playground).
Below is a summary of findings across Google Chrome / Gemini (WebMCP), OpenAI (ChatGPT Browser & Codex), Anthropic (Claude Browser Use), and AI Search / Web Crawlers, along with a proposed implementation roadmap.
1. Audit of Current Gaps
| Surface / File | Current State | Identified Gap |
|---|---|---|
packages/playground/website/index.html |
Has <meta name="llms:instructions">, <link rel="alternate" type="text/plain" href="https://github.com/llms.txt">, WebMCP Origin Trial token, and OpenGraph tags. |
Raw HTML Scraper Trap: The only static text inside <body> before React mounts is #wkwebview-notice ("Open in your browser... WordPress Playground requires features that are not available in in-app browsers") and #load-error-fallback ("Could not load WordPress Playground"). Non-JS AI crawlers (GPTBot, ClaudeBot, PerplexityBot) see an error notice instead of what Playground is. Also missing Schema.org JSON-LD and robots.txt. |
packages/playground/website/public/llms.txt |
37-line Markdown overview with 5 doc links and basic facts. | Does not document WebMCP (document.modelContext) tools, @wp-playground/mcp, Query API URL parameters (?plugin=, ?theme=, ?php=, ?wp=, ?blueprint-url=, ?networking=yes), inline # Blueprint JSON URLs, or link to an llms-full.txt. |
packages/playground/website/public/manifest.json |
Basic PWA manifest. | description is just "WordPress Playground"; missing categories, shortcuts, and rich metadata. |
packages/playground/personal-wp/ |
Has WebMCP Origin Trial token and basic meta description. | Missing /llms.txt, <meta name="llms:instructions">, <link rel="alternate" href="https://github.com/llms.txt">, Schema.org JSON-LD, and static HTML fallback. |
packages/playground/mcp/ (webmcp.ts, webmcp-site-tools.ts, tool-definitions.ts) |
Registers 17 top-level WebMCP tools via document.modelContext.registerTool() and proxies inner WordPress iframe tools. |
Missing Chrome 156+ / W3C WebMCP annotations (consequentialHint, untrustedContentHint, debugging), additionalProperties: false in JSON schemas for OpenAI WebMCP compatibility, AbortSignal handling in execute(input, { signal }), positive phrasing in tool descriptions, and /.well-known/mcp.json discovery metadata. |
packages/docs/site/ |
Generates manifest.json via generate-handbook-manifest.js with raw GitHub .md URLs. |
Does not generate /llms.txt or /llms-full.txt for the documentation site, and lacks an in-DOM agent directive pointing browsing agents to .md sources. |
2. Platform-by-Platform Findings
A. Google Chrome & Gemini — WebMCP (document.modelContext)
References:
- WebMCP: Build effective tools
- WebMCP: Best practices
- WebMCP: Imperative API & Declarative API
- WebMCP: Secure tools & Evals
Key improvements needed:
- WebMCP Annotation Hints (
tool.annotations):consequentialHint: boolean: Signals high-stakes or state-mutating actions so the browser/agent prompts for user confirmation. Currentlytool-definitions.tssets MCP'sdestructiveHint, whereas WebMCP checksconsequentialHint.untrustedContentHint: boolean: Critical security signal for tools returning site/user-generated content (playground_request,playground_read_file,playground_list_emails) to defend against indirect prompt injection.debugging: boolean: Marks developer/diagnostic tools (playground_execute_php,playground_request, etc.).readOnlyHint: boolean: Already present on read-only tools; should also be preserved acrosswebmcp-frame-bridge.tsalong withconsequentialHint,untrustedContentHint, anddebugging.
- Cancellation via
AbortSignal: Support the second parameterexecute(input, { signal })inwebmcp.tsandwebmcp-site-tools.ts. - Positive Framing & Character Budgets:
- Replace negative constraints (e.g.,
playground_request: "Do not use this to navigate the user's browser — use playground_navigate instead") with positive, action-oriented guidance ("Fetches an HTTP response in the background without changing the visible browser page. To navigate the visible preview iframe, call playground_navigate."). - Keep descriptions within recommended WebMCP budgets (
< 500chars per tool description,< 150chars per parameter description,< 30chars per name) and return actionable recovery hints on errors.
- Replace negative constraints (e.g.,
B. OpenAI ChatGPT & Codex — Site Tools (WebMCP) & Annotations Extensibility
References:
- ChatGPT Site tools (WebMCP)
- ChatGPT Annotations Extensibility
- ChatGPT Built-in Browser
- ChatGPT Configuration
Key improvements needed:
- ChatGPT WebMCP ("Site Tools") Compatibility:
- ChatGPT's built-in browser discovers top-level
document.modelContext.registerTooltools under Site tools in the address bar. - Iframe & Declarative Limitations: ChatGPT does not support the Declarative HTML Form API and does not discover tools inside iframes. Playground's
webmcp-site-tools.tstop-level proxy already bridges inner WordPress iframe tools to the top-level document, solving the iframe limitation! - Strict Input Schema: Ensure
zodToJsonSchemaintool-definitions.tsoutputsadditionalProperties: falseon object schemas, matching OpenAI's WebMCP schema convention.
- ChatGPT's built-in browser discovers top-level
- ChatGPT Browser Annotations (
oai-annotatable&document.oai.annotation):- Add
oai-annotation-container,oai-annotatable="<region-name>", andoai-annotation-metadata='<flat JSON>'to Playground's top-level UI regions (Viewport, Dock toolbar, Site Settings, Blueprint editor, Logs, File browser). - Attach live active-site metadata (
siteSlug,wpVersion,phpVersion,currentUrl,activeDockTool) viaoai-annotation-metadataso when a developer annotates a visual bug in Playground using ChatGPT's built-in browser, Codex automatically receives the active WordPress/PHP version and route context.
- Add
C. Anthropic Claude — Browser Use Tool (browser_toolset_20260801)
References:
Key improvements needed:
- Accessibility Tree (
read_page&find) Optimization:- Claude's browser tool navigates primarily via
read_page(accessibility tree[ref_N]handles) andfind(accessible names and roles), and struggles with elements buried inside nested iframes without top-level controls. - Ensure Playground's top-level shell, URL bar, and Dock panels expose clear ARIA landmarks and accessible labels.
- Claude's browser tool navigates primarily via
- Agent Documentation Directives:
- Both
learn.chatgpt.comandplatform.claude.comexpose a machine-readable directive linking to/llms.txtand.mdpage twins so browsing agents ingest clean Markdown instead of scraping UI chrome.
- Both
3. Proposed Implementation Tracks
Track 1: llms.txt, .well-known JSON & Documentation AI Index
- Enrich
packages/playground/website/public/llms.txt(and mirror topersonal-wp) with:- Query API parameters (
?php=,?wp=,?plugin=,?theme=,?url=,?blueprint-url=,?networking=yes) and inline#Blueprint JSON URLs so LLMs can construct working Playground links in chat responses. - Built-in WebMCP (
document.modelContext) tools reference and@wp-playground/mcp/@wp-playground/cliusage.
- Query API parameters (
- Add
/llms-full.txtand/.well-known/llms.txt//.well-known/mcp.jsondiscovery manifests. - Extend
packages/docs/site/plugins/generate-handbook-manifest.js(or add a companion Docusaurus plugin) to auto-generate/llms.txtand/llms-full.txtlinking directly to raw.mddocs and materialized TypeDoc Markdown (static/handbook/*.md).
Track 2: AI Web Crawlers (robots.txt), Static HTML Fallback & Schema.org JSON-LD
- Fix the raw HTML scraper trap in
packages/playground/website/index.htmlandpackages/playground/personal-wp/index.htmlby providing semantic static fallback content (<h1>,<p>, feature list, and doc links) inside<main id="root">(automatically replaced when React mounts) and/or<noscript>. - Add
packages/playground/website/public/robots.txtexplicitly allowing AI crawlers (GPTBot,OAI-SearchBot,ChatGPT-User,ClaudeBot,Claude-Web,Google-Extended,PerplexityBot,Applebot-Extended) and referencing/llms.txt. - Add Schema.org JSON-LD (
<script type="application/ld+json">) withWebApplication/SoftwareApplication,Organization(WordPress.org),featureList,offers(free), andsameAsentity links (GitHub, WordPress.org, npm, Docs). - Enrich
packages/playground/website/public/manifest.jsonwith a completedescription,categories, andshortcuts.
Track 3: WebMCP (document.modelContext) Spec & Security Alignment
- Update
packages/playground/mcp/src/webmcp.ts,webmcp-site-tools.ts,tool-definitions.ts, andpackages/playground/remote/src/lib/webmcp-frame-bridge.tsto support Chrome 156+ WebMCP annotations (consequentialHint,untrustedContentHint,debugging,readOnlyHint). - Add
additionalProperties: falseto generated JSON schemas inzodToJsonSchemafor OpenAI WebMCP compatibility. - Support
AbortSignal(execute(input, { signal })) and actionable error recovery responses inwebmcp.ts. - Refactor negative phrasing in tool descriptions in
tool-definitions.tsto follow Chrome WebMCP best practices.
Track 4: ChatGPT Browser Annotations & Claude Browser Accessibility Polish
- Add
oai-annotation-container,oai-annotatable, and liveoai-annotation-metadata(active site slug, PHP/WP versions, current URL, active Dock pane) to Playground's top-level layout and Dock components. - Audit top-level ARIA landmarks and interactive control labels for Claude Browser Use (
read_page/find).
Describe alternatives you've considered
- Relying solely on client-side rendering and existing
llms.txt: Leaves non-JS AI crawlers indexing only the#wkwebview-notice/#load-error-fallbacktext inindex.html, and misses new WebMCP security hints (untrustedContentHint,consequentialHint) and ChatGPT browser annotation hooks. - Using Declarative WebMCP (
<form toolname="...">) alone: Not supported by ChatGPT's built-in browser; keeping our imperativedocument.modelContext.registerToolimplementation as the primary surface (with optional declarative progressive enhancement) ensures cross-platform support across Chrome/Gemini and ChatGPT.
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Type] EnhancementNew feature or requestNew feature or request
Activity
fellyph commentedon Oct 8, 2026
Opened PRs for each of the 4 implementation tracks:
llms.txt,.well-known/mcp.json, Docs/llms.txt): [Website][Docs] Enrich llms.txt, add .well-known/mcp.json, and generate docs llms.txt #4409robots.txtfor AI crawlers, Schema.orgWebApplicationJSON-LD,<noscript>HTML fallback): [Website] Add robots.txt for AI crawlers, Schema.org JSON-LD, and noscript fallback #4410consequentialHint,untrustedContentHint,debugging, strictinputSchema,AbortSignal): [MCP] Add WebMCP security annotations, strict inputSchema, and AbortSignal support #4411oai-annotatable& liveoai-annotation-metadata): [Website] Add ChatGPT browser annotation containers and live site metadata #4412