Skip to main content
Glama

Search smart

search_smart
Read-only

Find photos by describing their visual content in natural language, using CLIP embeddings to match queries to images and rank results by similarity.

Instructions

AI-powered visual search using CLIP embeddings. Use this when describing what a photo looks like in natural language (e.g. 'sunset at the beach', 'dog playing fetch'). For structured criteria (city, camera, date), use search_metadata instead. Requires Immich ML service with Smart Search enabled. Read-only.

Args:
    query: Natural language description of the visual content to find.
    city: Optional city filter to narrow results geographically.
    state: Optional state/region filter.
    country: Optional country filter.
    taken_after: ISO date — only assets captured after this date.
    taken_before: ISO date — only assets captured before this date.
    ocr: Text recognized inside the image, combined with the visual query.
        Needs OCR enabled on the server — check with get_capabilities.
    person_ids: Only assets showing ALL of these people (ids from list_people).
    tag_ids: Only assets carrying these tags (ids from list_tags).
    album_ids: Only assets inside these albums.
    page: Page number, starting from 1 (default 1).
    size: Results per page (1-200, default 50).

Returns: JSON with total count, page, and assets ranked by visual similarity to the query.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_smart"
  }
}

Input Schema

NameRequiredDescriptionDefault
ocrNo
cityNo
pageNo
sizeNo
queryYes
stateNo
countryNo
tag_idsNo
album_idsNo
person_idsNo
taken_afterNo
taken_beforeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.2
    • addedInput schema / properties / album_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Album Ids"
      +}
    • addedInput schema / properties / ocr
      Added value: +{
      +  "default": "",
      +  "title": "Ocr",
      +  "type": "string"
      +}
    • addedInput schema / properties / person_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Person Ids"
      +}
    • addedInput schema / properties / tag_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tag Ids"
      +}
  2. First observedv1.0.0

TDQS

A4.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to establish the safety profile. It adds useful operational context by noting the Immich ML service requirement and that OCR needs a server capability check, though it does not discuss rate limits or ranking caveats.

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?

The description is front-loaded with purpose, usage routing, prerequisite, and return summary before the parameter details. The longer argument section is justified by 12 parameters and each line adds semantics rather than merely restating schema titles.

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 12-parameter search tool with an output schema, the definition is complete enough to call correctly. It explains required services, describes every parameter's meaning, routes structured searches to the sibling tool, and summarizes the ranked result format.

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?

Schema description coverage is 0%, so the description carries the full parameter burden, and it does so for all 12 arguments. It documents natural-language query intent, optional geographic and date filters, OCR behavior, ID sources for people/tags/albums, and pagination defaults and ranges.

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 states a specific verb and resource: AI-powered visual search using CLIP embeddings for natural-language photo descriptions. It explicitly distinguishes itself from structured search by naming search_metadata as the alternative for city, camera, and date criteria.

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

Usage Guidelines5/5

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

It gives a clear when-to-use rule: natural-language visual descriptions such as 'sunset at the beach'. It also gives an explicit alternative for structured criteria, search_metadata, and states the required server capability.

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

Deploy Server

Other Tools