cdp_monaco_editor
Control Monaco Editor instances in web pages to read, write, or clear code while preserving formatting. Part of the CDP MCP server for browser automation.
Instructions
Interact with Monaco Editor (VS Code web editor) on the page. Detects Monaco instances and provides reliable get/set operations that preserve formatting. Much better than generic text input tools for Monaco.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action: detect (find editors), getValue (read code), setValue (write code), clear (empty editor) | |
| value | No | Code to set (required for setValue action) | |
| editor_index | No | Editor index to target when multiple Monaco editors exist (default: 0) |