List uploaded files and screenshots
media.listReadsOnly looks things up; never changes your workspace.What it does
Lists files stored in the connected workspace, such as screenshots taken during test runs, newest first. Omit hasTestRun to list every file; true returns only files linked to BOTH a test case and a test run (evidence of what a test saw when it ran); false returns the rest (files not tied to a test run, such as ones attached only to a test case or a feature). Use it to find a screenshot to show the user or to check what evidence a run left behind. Returns {items: [{id, uri, path, type, size, mediaClass, testCaseId, testRunId, testSuiteId}], totalItems}: path is the public URL of the file, type is its MIME type, size is in bytes, mediaClass is screenshot, video, document or attachment. Not paginated. Read-only.
Ask your agent
You don’t call media.list yourself. Say something like this to Claude Code, Cursor or another MCP-connected agent:
- “Show me the screenshots from the last test run”
- “What files have we uploaded that are not tied to a test run?”
Inputs
| Name | Type | Description |
|---|---|---|
hasTestRunoptional | boolean | Omit for every file. true = only files linked to both a test case and a test run (run evidence); false = files not linked to a test run (or not linked to a test case). |
The MCP call
What the agent’s MCP client sends (placeholders in angle brackets):
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "media.list",
"arguments": {
"hasTestRun": true
}
}
}Connect your agent
npx -y @testmaze/mcp init tmt_xxx claude mcp add tm --scope project -- npx -y @testmaze/mcp
Create the token in your Test Maze workspace under Settings → MCP. Setup for Cursor, Cline, Gemini CLI and Codex CLI is shown there too.
More media tools
- Upload a file (base64) and attach it to a test
media.upload_url