Skip to main content
Glama

Search media by natural language

media.search
Idempotent

Find 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

NameRequiredDescriptionDefault
fromNoOnly media that came this way (media.list's from). Free
kindNoOnly these kinds. Free
saysNoName to what matching speech says, judged on ~30 s passages of each media's existing transcript; media without one are listed as skipped
looksNoName (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_idsNoOnly these media. Free
candidatesNoJudge 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_secondsNoJudge each media from this second on. Free
cost_overrideNoRun 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_containsNoOnly media whose name contains this, ignoring case. Free
until_secondsNoJudge each media up to this second. Free
idempotency_keyNo
min_probabilityNoA keyframe or passage matches a criterion when its probability is at least this
max_duration_secondsNoOnly media at most this long. Free
min_duration_secondsNoOnly media at least this long. Free

Output Schema

NameRequiredDescriptionDefault
hintYes
job_idYesJob handle; the same value is the MCP task id
resultNoThe result, when status is completed; otherwise job.get gives it once completed
statusYes
media_idNoThe media it is making: an import is usable in edits once its status is processing, a created media once this job completes
status_uriYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / cost_override / description
      Previous value: -"Run a search estimated over 1 credit: user_confirmed (the user saw this estimate and agreed) or user_preapproved (the user said to search whatever it costs)"New value: +"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)"
    • changedOutput schema / properties / result / properties / estimate / properties / credits / description
      Previous value: -"judgments at 200 a credit, plus a few seconds of running time"New value: +"Credits it spends: 0, since searching, like all making, is free"
    • changedOutput schema / properties / result / properties / searched / description
      Previous value: -"false: over 1 credit without cost_override; nothing was judged or charged"New value: +"false: over 200 judgments without cost_override; nothing was judged"
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the supplied annotations: it quantifies the cost model (one judgment per keyframe or passage, ~1 per image, 10-minute video ≈ 50–260), states that searching spends no credits but consumes wall-clock time, and explains the hard 200-judgment gate with the searched:false response shape. The skipped-list explanation ("not found there is not the same as not there") and the async "returns a task, or a job_id for job.get" disclosure are exactly the behavioral facts an agent cannot infer from readOnlyHint/idempotentHint alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and broken into labeled blocks (SIZE., HOW TO WRITE CRITERIA.), which helps. But the opening sentence is syntactically tangled ("looks criteria are judged on pictures"), and it re-enumerates the free filters that the schema already documents item by item, inflating an already long description. Most sentences earn their place, but the phrasing is dense enough to slow scanning.

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 14-parameter, nested-object, long-running search tool this is complete: it covers criteria authoring with examples, the cost/estimation gate, pruning order, skip reasons, and how to collect results via job.get, even though an output schema exists. Nothing an agent needs to call it correctly or recover from a cost rejection is missing.

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 93%, so the per-parameter documentation is already done; the description's added value is the interaction model — filters cut what is judged before anything is, candidates trades recall for cost and can drop small or brief subjects, and cost_override carries the user-confirmation contract. It also warns that pictures are judged at ~512 px so fine detail can be missed, which is meaning the schema does not carry.

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?

"Find moments across all the user's media from what you describe in plain words" names a specific verb (find moments), resource (media), and input modality (natural language). The clause "media.seek across every file instead of one" gives an explicit scope contrast with the sibling tool, so an agent can pick between the single-file and all-files variants without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Strong operational guidance: narrow with kind/media_ids/from/name_contains/duration/from_until_seconds before judging, use candidates when cost matters and accept its recall risk, and "Ask everything you are looking for in one call." It also documents the confirmation flow (cost_override after telling the user the estimate). It stops short of an explicit when-not-to-use statement or a named alternative for single-file or transcript-only searches, which keeps it at 4 rather than 5.

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.