Search media by natural language
media.searchFind moments across all the user's media from what you describe in plain words: media.seek across every file instead of one. looks criteria are judged on pictures: each keyframe of every video (a new keyframe wherever the picture changes, at least every 10 s, picked when the media was indexed) and each image. says criteria are judged on ~30 s passages of transcripts the media already has. You get matches per criterion across files (media, start, end, best moment and its picture), most probable first. SIZE. Each keyframe or passage judged is one judgment, however many criteria (up to 32) it carries; searching spends no credits, but judgments take time. Images take 1 each; a 10-minute video about 50 to 260 by how much its picture changes. Every file the search keeps adds to it, so narrow first: kind, media_ids, from, name_contains, duration and from/until_seconds cut what is judged before anything is. candidates keeps the N media whose pictures look most like looks by local similarity, far quicker, though it can drop media where the thing is small or brief. Ask everything you are looking for in one call. A search estimated over 200 judgments is not run: the result has searched false, the estimate (judgments, by kind, the largest media) and what the filters could cut. Tell the user how big it is and run it again with cost_override once they agree. HOW TO WRITE CRITERIA. As for media.seek: say what a matching picture shows or what the speech says, one judgment each, with {instructions, criteria: {true, false}} examples for accuracy. Pictures are judged at about 512 px, so small detail (a logo in a corner, fine print) can be missed. skipped lists media the filters kept that were not judged, and why (still indexing after import, no transcript, outside candidates): not found there is not the same as not there. Long-running: returns a task, or a job_id for job.get.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "media.search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Only media that came this way (media.list's from). Free | |
| kind | No | Only these kinds. Free | |
| says | No | Name to what matching speech says, judged on ~30 s passages of each media's existing transcript; media without one are listed as skipped | |
| looks | No | Name (yours) to what a matching picture shows, judged on every keyframe of each video and on each image: a statement about the picture, or {instructions, criteria: {true, false}} with a case of each | |
| media_ids | No | Only these media. Free | |
| candidates | No | Judge only the media whose pictures look most like the looks criteria, by local similarity (free, no judgments): far cheaper, and can drop media where the thing is small or brief | |
| from_seconds | No | Judge each media from this second on. Free | |
| cost_override | No | Run a search estimated over 200 judgments: user_confirmed (the user saw this estimate and agreed) or user_preapproved (the user said to search however large) | |
| name_contains | No | Only media whose name contains this, ignoring case. Free | |
| until_seconds | No | Judge each media up to this second. Free | |
| idempotency_key | No | ||
| min_probability | No | A keyframe or passage matches a criterion when its probability is at least this | |
| max_duration_seconds | No | Only media at most this long. Free | |
| min_duration_seconds | No | Only media at least this long. Free |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hint | Yes | ||
| job_id | Yes | Job handle; the same value is the MCP task id | |
| result | No | The result, when status is completed; otherwise job.get gives it once completed | |
| status | Yes | ||
| media_id | No | The media it is making: an import is usable in edits once its status is processing, a created media once this job completes | |
| status_uri | Yes |