Conversation
get_page and search_docs ran prose through a Blade cleaner that removed every @word, including inline code like `@press` and `@change`. Event lists came out as "- `` - Component method to call when tapped", so agents opened vendor source to find event names. Inline code spans are now kept and unescaped the way Blade renders them. get_edge_component returns one element's props, events, children and fluent API from its docs page, without the examples. Sub-elements like list-item get their own section plus their fluent methods. list_edge_components and the REST listing now name the tags each page documents. The tag to page map is built from the markdown, so it can't drift from the site. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In our todo app benchmark, agents with the docs MCP enabled called
list_edge_componentsa few times, then gave up and read vendor source for element props. ListItem.php alone was opened 9 times. Two things were behind that.The first is a bug.
get_pageandsearch_docsrun prose through a Blade cleaner that removes every@word. That includes inline code, so the Events section of every EDGE page came through the MCP as:You can see it now with
get_page mobile/4/edge-components/button. No event name (@press,@change,@submit) was ever visible through the MCP. The cleaner now leaves inline code spans alone and unescapes them the way Blade renders them (@{{ $x }}shows as{{ $x }}). Fenced code was already kept.The second is a missing tool.
list_edge_componentsonly gave page titles, and sub-elements like<native:list-item>or<native:outlined-text-input>don't have pages of their own. So:get_edge_componenttool. Pass a tag (list-item,<native:list-item>,list_itemandListItemall work) and it returns that element's props, events, children and fluent API, plus the PHP class and a note that v4 elements need nativephp/mobile-ui registered. Examples are left out and it points atget_pagefor them.ListItemmethods block from the Element section. For a page-level element you get the page minus Examples and minus any sub-element sections.list_edge_componentsnow prints the tags each page documents and mentions the new tool. The REST listing gets atagsarray, and there's a new/api/mcp/edge-components/{platform}/{version}/{tag}.The tag map is built from the docs markdown itself: an H2 named after the tag, then the page slug, then the page that names the tag most in prose (only if it also appears in that page's code). So it follows the docs as they change. It works for core-backed elements (column, text, rect) and mobile-ui ones the same way. The page cache key moves to v3 so pages cached with the stripped prose aren't reused.
How I tested: new cases in DocsMcpServerPageTest cover the tool, the spellings, the unknown-tag error, the list output, REST, and that
@presssurvivesget_page. One test walks every catalogued tag and checks it resolves to a non-empty reference and a pageget_pagecan open. McpSecurityTest gets a traversal case for the new route. The full suite passes apart fromSupportTicketTest > only internal notes can be pinned, which is flaky and fails on main too.What to watch: the reference is only as good as the page. The docs PR #539 fixes the list-item and text-input gaps agents hit, and this reads straight from those pages.
video-playershows up as a tag on the pager page because the pager docs use it. That seemed more useful than hiding it.🤖 Generated with Claude Code