Observe the current mini program page
mp_pageInspect the current WeChat Mini Program page to retrieve route, query, page data, viewport, scroll offset, and page stack; optionally request WXML markup when a selector is unknown.
Instructions
Describe the current page: route path and query, page data (optionally one branch via data_path), viewport size, scroll offset and the page stack. Pass include ["wxml"] to see the markup when a selector cannot be guessed from what is on screen. Large data is truncated with an explicit marker.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "mp_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| include | No | What to include. Defaults to ["data"]. `wxml` returns the page markup and is large; request it only when a selector could not be guessed. | |
| selector | No | With include ["wxml"], return that element's WXML instead of the whole page. | |
| data_path | No | Path inside the page data, e.g. "list.items" or "form". |