Skip to main content
Glama

scout_upload

Attach files to visible or hidden upload controls by intercepting the file chooser, using generated in-memory fixtures or real project files and optional filename overrides for boundary tests.

Instructions

Attach a file to an upload control the way a user does. ref is either a visible (snapshots list these with role file) or the button/label/dropzone that opens the file chooser — the chooser is intercepted and answered, which is how the hidden input behind a styled 'Choose file' control is reached. Omit ref to target the page's only file input, hidden or not (snapshots disclose hidden ones on a FILE INPUTS line). Nothing needs to exist on disk: a small VALID fixture (real PDF/PNG structure) is generated in memory, its kind inferred from the input's accept attribute or chosen with fixture; filePath uploads a real file but must live inside the attached project (fenced like navigation is fenced to the origin), and a credential-shaped one (a dotfile or anything in a hidden folder, .env*, an SSH key, *.pem/*.key/*.p8/*.p12/*.pfx/*.ppk/*.jks/*.keystore/*.asc/*.kdbx, anything under .ssh, .aws, .gnupg, .config, .kube or .docker) is refused unless the operator listed it; name overrides the filename for boundary tests (wrong extension vs accept, very long, unicode). The result names the input, how the file reached it, flags a file that violates accept (a mismatch the app then accepts is a validation finding), warns if the app cleared the input after selection, and says whether a state-changing request fired on selection — if none did, click the form's submit, or check the next snapshot for a client-side rejection.

Input Schema

NameRequiredDescriptionDefault
refNoElement ref of the file input OR of the control that opens the file chooser; omit when the page has exactly one file input
nameNoFilename override (default scenescout-fixture.<kind>, or the disk file's own name)
taskNoWhat you are DOING right now, in a few words: the action, not the acceptance criteria. "Filtering the documents register by status", "Filling the deviation form with invalid dates", "Signing in as QA_Team" — NOT "§2.4 filtering narrows the set and the filter is reflected in the URL", which is what you are CHECKING, not what you are doing. Naming the item you are on is fine ("§2.4: filtering the documents register"); keep the rest to what a colleague would see over your shoulder. It stays set until you pass a different one, so a batch costs a few words, not one per call. Required on the tools that act unless a journey or an earlier call already set one.
fixtureNoGenerated fixture kind; default: inferred from the input's accept attribute (pdf when there is none, or none we can generate)
sessionNoTarget this session directly instead of the active one — pass it explicitly when dispatching to MULTIPLE sessions in one turn (e.g. two scout_click calls with different `session`), which then run CONCURRENTLY rather than queueing. Omit for single-session sequential use.
filePathNoA real file to upload — absolute or relative to the project; must be inside the attached project. Exclusive with fixture.
objectiveNoOld name for `task` (2.0). Prefer `task`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.31.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / objective
      Added value: +{
      +  "description": "Old name for `task` (2.0). Prefer `task`.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
    • addedInput schema / properties / task
      Added value: +{
      +  "description": "What you are DOING right now, in a few words: the action, not the acceptance criteria. \"Filtering the documents register by status\", \"Filling the deviation form with invalid dates\", \"Signing in as QA_Team\" — NOT \"§2.4 filtering narrows the set and the filter is reflected in the URL\", which is what you are CHECKING, not what you are doing. Naming the item you are on is fine (\"§2.4: filtering the documents register\"); keep the rest to what a colleague would see over your shoulder. It stays set until you pass a different one, so a batch costs a few words, not one per call. Required on the tools that act unless a journey or an earlier call already set one.",
      +  "maxLength": 120,
      +  "type": "string"
      +}
  3. Addedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that fixtures are generated in memory and are structurally valid, that filePath is fenced to the project, that credential-shaped paths (.env, .ssh, *.pem, etc.) are refused unless the operator listed them, and that it warns on accept mismatches and cleared inputs. It also reports whether a state-changing request fired, which is the key behavioral signal for an upload action.

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?

Purpose is front-loaded in the first sentence and every sentence carries distinct information (targeting, fixture generation, path policy, result reporting). The cost is density: several sentences cram three or four clauses each, so an agent must parse long chains to extract the acceptance-mismatch or credential-refusal rules.

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?

For a 7-parameter, no-output-schema tool, this covers what an agent needs: how to target, how the file is sourced, what gets refused, and explicitly what the result contains (input named, delivery method, accept violation flag, cleared-input warning, request-fired status). Nothing essential is left to guesswork.

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 100%, so baseline is 3, but the description adds real semantics beyond the schema: fixture kind inference from the accept attribute (with pdf as the no-accept default), the purpose of `name` for boundary tests, and the exclusivity/fencing rules for filePath. It does not add anything about `task`, `session`, or the deprecated `objective`, which is why it falls short of a 5.

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?

Opens with a specific verb and resource: 'Attach a file to an upload control the way a user does.' It immediately distinguishes itself from scout_click/scout_attach by explaining that the file chooser is intercepted rather than clicked, so an agent knows this is the file-specific path.

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?

Spells out three concrete targeting modes (visible input ref, chooser-opening control, omit ref for the only input) and their preconditions, plus the fixture vs filePath choice and the fallback ('if none did, click the form's submit, or check the next snapshot for a client-side rejection'). Alternatives are named rather than implied.

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