Skip to main content
Glama

cdp_upload_shadow

Upload files to file inputs within shadow DOM elements. Use after identifying the target input with cdp_execute to automate browser file uploads.

Instructions

Upload a file to a file input in shadow DOM. First use cdp_execute to find the file input and store it in window.__fileInput, then call this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the file to upload
Behavior2/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 of behavioral disclosure. It mentions the prerequisite step with cdp_execute, which is useful context, but lacks details on permissions, error handling, or what happens after upload (e.g., does it trigger form submission?). For a mutation tool with zero annotation coverage, this is insufficient, though it's not misleading.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the core purpose and followed by a precise usage step. Every sentence earns its place by providing essential information without redundancy, making it highly efficient and well-structured.

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 the tool's complexity (involving shadow DOM and prerequisites), lack of annotations, and no output schema, the description is partially complete. It covers the purpose and usage steps but misses behavioral details like error cases or return values. This is adequate for basic use but leaves gaps for an AI agent to handle edge cases.

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?

The schema description coverage is 100%, with the parameter 'file_path' fully documented in the schema as 'Absolute path to the file to upload.' The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 for high schema coverage without extra value.

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: 'Upload a file to a file input in shadow DOM.' It specifies the verb ('upload'), resource ('file'), and target context ('file input in shadow DOM'). However, it doesn't explicitly differentiate from sibling tools like cdp_set_value or cdp_interact, which might also handle file inputs in different contexts, so it falls short of a perfect 5.

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

Usage Guidelines5/5

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

The description provides explicit usage instructions: 'First use cdp_execute to find the file input and store it in window.__fileInput, then call this tool.' This clearly states when to use it (after cdp_execute) and implies an alternative approach (using other tools for non-shadow DOM contexts), offering complete guidance.

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