Skip to main content
Glama

search_assets

Locate media assets by applying filters, tags, and advanced query operators to retrieve exactly what you need.

Instructions

Search for assets using filters and advanced query operators.

ADVANCED SEARCH QUERY SYNTAX (for the 'q' parameter):

  • Basic: Just type a term to search all fields (e.g., "dog")

  • Exclude: Use NOT or minus to exclude (e.g., "NOT dog" or "-dog")

  • Combine: Use AND, OR, NOT (e.g., "dog AND cat", "dog OR cat", "dog NOT cat")

  • Field search: Use field:value syntax (e.g., "tag_text:nature", "filename.keyword:IMG_1234.jpg")

  • Wildcards: Use * (zero or more chars) or ? (single char) (e.g., "tag_text:part*", "tag_text:?artial")

  • Existence: Use field:** to find assets with any value, NOT field:** for empty (e.g., "NOT tag_text:**" finds untagged assets)

  • Complex: Use parentheses for grouping (e.g., "(dog OR cat) AND ext:jpg")

NOTE on multi-word queries: the API uses Elasticsearch cross_fields, so a multi-word query like "red barn" can match if "red" appears in one field and "barn" appears in another. Quote phrases ("red barn") to require both terms in the same field.

Sort: pass either 'order' or its alias 'direction' (asc/desc). Results have an implicit id:asc tiebreaker (except when using a custom sort).

COMMON SEARCH FIELDS:

  • tag_text: Keywords/tags

  • filename.keyword: Exact filename

  • description: Asset description

  • title: Asset title

  • ext: File extension

  • creator_text: Creator/photographer name

  • copyright: Copyright text

  • city, state, country: Location fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoSearch query with optional advanced operators (AND, OR, NOT, field:value, wildcards)
gpsNoFilter for assets with GPS data
idsNoFilter by specific asset IDs
extsNoFilter by file extensions
pageNoPage number
tagsNoFilter by tags
guidsNoFilter by specific asset GUIDs
aspectNo
ratingNoFilter by rating range [min, max]
per_pageNoResults per page (max 100)
created_atNoDate range [start, end] in ISO 8601
has_peopleNo
captured_atNoDate range [start, end] in ISO 8601
lightbox_idNoFilter by lightbox ID
has_alt_textNo
include_metaNoInclude full EXIF/IPTC metadata
collection_idNoFilter by collection ID
include_totalsNoInclude aggregate counts
storage_folder_idNoFilter by storage folder ID
include_renditionsNoInclude available sizes/formats
Behavior4/5

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

With no annotations, the description carries full burden and discloses substantial behavior: Elasticsearch cross_fields matching, implicit id:asc tiebreaker, wildcard/existence operators, and sort behavior. It does not cover output structure, default pagination, or authentication, but for a read-only search tool, the disclosed query semantics are highly valuable.

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

Conciseness5/5

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

Though long, the description is well-organized into sections (query syntax, multi-word note, sort, common fields) with no redundant sentences. It front-loads the purpose and then provides dense, structured reference material appropriate for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 20-parameter search tool with no output schema, the description thoroughly covers the query language, sort, and search fields. However, it does not explicitly describe the response format or default result ordering, which would be needed for full completeness. The main functional aspects are well covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has high coverage (85%), but the description adds deep meaning for the 'q' parameter with full syntax, examples, and field search. It also reveals two undocumented parameters ('order' and 'direction') and lists common search fields, going far beyond the schema's terse descriptions. This significantly enhances parameter understanding.

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?

The description immediately states 'Search for assets using filters and advanced query operators', clearly identifying the verb (search), resource (assets), and the capability (filters and advanced operators). It distinguishes from sibling tools like get_asset (single asset by ID), search_asset_faces (face-specific search), and search_assets_visual (visual search) by focusing on metadata and query syntax.

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

Usage Guidelines3/5

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

The description implies usage for advanced asset searching but does not explicitly state when to use this tool vs alternatives like search_assets_visual or get_asset. It gives no exclusions or 'when not to use' guidance, so the context is clear but not fully differentiated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mediagraph-io/mediagraph-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server