# MCP file upload for Every Checks

**Deliverable:** `mcp-file-upload.patch` (one commit against `EveryInc/checks` `18df437`) plus `PR.md`, which has the apply steps and the PR title and body to paste. The patched tree is in `code/`.

**No PR link.** This environment has no authenticated GitHub access (`gh` cannot read its config here, and the snapshot has no git history to push), so the deliverable is the reviewable patch. Applying it is three commands; they are at the top of `PR.md`.

## What was built

- **`add_input`** MCP tool: puts a file on a case at a case-relative path, inline as text or base64, up to 10 MB. Same path replaces. Returns the case's whole input list.
- **`remove_input`** MCP tool.
- **`POST /benchmarks/:slug/tasks/:task/cases/:case/inputs`**: multipart with the same bearer token, `inputs[<path>]=@file`, for files too big to send inline. `add_input` returns this URL and a ready `curl` line when a file is over the limit.
- `get_case` and `get_task` list a case's inputs. `add_task` and `add_case` now tell the agent to use `add_input` instead of "upload on the app" (the app has no upload; that message was the source of the "no way to upload files" statement in the screenshot).
- The files land exactly where the bundle and `run.sh` expect them, beside `prompt.md`, because the path is stored the same way the repo import stores it. Paths that would overwrite the brief or the checks folder are refused.
- README tool table corrected; tests added for both doors.

## Assumptions and caveats

- **Tests were not run here.** The sandbox blocks rubygems.org, so the Rails bundle could not be installed. All changed Ruby files pass `ruby -wc`, and the tests follow the existing suite's helpers exactly, but the eng team should run `bin/rails test` after applying, before pushing. `PR.md` says so.
- Inline limit of 10 MB is a judgment call, documented in the PR; larger files have the HTTP door.
- The patch author is set to your address (`mjt145@gmail.com`). Change it with `git commit --amend --reset-author` after `git am` if the team's convention (Nityesh as author, per CLAUDE.md) should apply.
- Scope kept to case inputs. Uploading `eval/` fixtures for check scripts and a web upload form are noted in the PR as follow-ups, not built.
