Skip to main content
Glama

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
NameRequiredDescriptionDefault
actionYesAction: detect (find editors), getValue (read code), setValue (write code), clear (empty editor)
valueNoCode to set (required for setValue action)
editor_indexNoEditor index to target when multiple Monaco editors exist (default: 0)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: detects Monaco instances, provides reliable get/set operations that preserve formatting, and implies it handles multiple editors (via 'editor_index'). However, it lacks details on error handling, performance, or side effects (e.g., if 'clear' destroys data irreversibly). The description doesn't contradict annotations, but it's moderately informative given the absence of structured data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the core purpose and key benefits. It uses three sentences efficiently, with no wasted words, though it could be slightly more structured (e.g., bullet points for operations).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is moderately complete for a tool with 3 parameters and 100% schema coverage. It covers the tool's domain (Monaco Editor) and key operations but lacks details on return values, error cases, or integration with sibling tools. For a mutation tool (setValue, clear) without annotations, it should ideally include more behavioral context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (action, value, editor_index) with descriptions and enums. The description adds minimal value beyond the schema, mentioning 'detect' and 'get/set operations' but not elaborating on parameter usage or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Interact with Monaco Editor (VS Code web editor) on the page' with specific operations (get/set that preserve formatting). It distinguishes from generic text input tools ('Much better than generic text input tools for Monaco'), though it doesn't explicitly differentiate from sibling tools like 'cdp_set_value' or 'cdp_type_text' which might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: for Monaco Editor instances on web pages, emphasizing it's better for preserving formatting compared to generic tools. However, it doesn't specify when NOT to use it or explicitly name alternatives among the sibling tools, such as 'cdp_set_value' for non-Monaco scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/RED-BASE/cdp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server