Skip to main content
Glama

Robot Actions — Remote Device Control

iOS Safari set input files

ios_safari_set_input_files
Idempotent

Set the files on a file-upload input () in Safari on an iOS device, WITHOUT opening the device's file picker. This is the only way to test an upload flow end to end on iOS: tapping an upload control opens a native sheet that automation cannot drive. Provide file content inline, or name a file already on the device (see ios_file_push / ios_upload_targets) to have it read from there. Fires the input and change events afterwards so framework bindings and validation run, then reads the input back and reports the file names and sizes the PAGE actually sees — so a silent no-op can't pass as success. Total content limit 2 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesiOS device UDID
filesYesFiles to attach. Pass several only for a multiple-file input
indexNoWhich match to use when the selector matches several (0-based, default 0)
pageIdNoCDP target id. Omit to use the page ios_safari_navigate last landed on
selectorYesCSS selector for the file input. Must resolve to an <input type="file"> element

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (which only declare non-readOnly, idempotent, non-destructive), the description discloses that the native picker is bypassed, that input and change events fire so framework bindings run, that the input is read back to verify what the page actually sees, and a hard 2 MB content limit. That is substantial operational context an agent cannot get from the structured fields.

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 core capability and its unique value are front-loaded in the first sentence, followed by the practical constraint, the content-source options, the event/verification behavior, and the size limit. Every sentence carries information; none is filler.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so ('reports the file names and sizes the PAGE actually sees'), plus the failure-mode caveat about silent no-ops. For a 5-parameter tool with a 2 MB limit, the constraints, alternatives, and result semantics are all covered.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description earns extra credit by explaining the inline-vs-device-path choice for file content and cross-referencing ios_file_push and ios_upload_targets for the devicePath option. It does not add detail for selector, index, or pageId beyond what the schema says.

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

Purpose5/5

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

The description states a precise verb and resource (set files on an `<input type="file">` in iOS Safari) and immediately distinguishes itself from the obvious alternative behavior by noting it works WITHOUT opening the native file picker. An agent can tell exactly what this does versus ios_upload_targets or ios_file_push.

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?

It gives an explicit when-to-use rationale ('the only way to test an upload flow end to end on iOS') and names the conditions under which alternatives apply ('name a file already on the device — see ios_file_push / ios_upload_targets'). No exclusions are left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources