Skip to main content
Glama

Search statistics

search_statistics
Read-only

Count photos and videos matching location, camera, favorite, OCR, or date filters without fetching the assets themselves. Returns only the total for quick library statistics.

Instructions

Count how many assets match a filter WITHOUT fetching them. Use this instead of search_metadata whenever only the number matters ('how many photos from Spain?', 'how many did I take in 2019?') — it costs one integer instead of pages of assets. Read-only.

Args:
    city: Count assets from this city.
    country: Count assets from this country.
    state: Count assets from this state/region.
    make: Count assets from this camera make.
    model: Count assets from this camera model.
    is_favorite: If true, count only favorites.
    ocr: Count assets whose recognized text matches (needs OCR on the server).
    created_after: ISO date lower bound on upload date (when it reached Immich).
    created_before: ISO date upper bound on upload date.
    taken_after: ISO date lower bound on capture date (when the photo was taken).
    taken_before: ISO date upper bound on capture date.

Returns: JSON {total}.

Input Schema

NameRequiredDescriptionDefault
ocrNo
cityNo
makeNo
modelNo
stateNo
countryNo
is_favoriteNo
taken_afterNo
taken_beforeNo
created_afterNo
created_beforeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.2

TDQS

A4.5/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, and the description's "Read-only" merely restates them. What it adds beyond the structured data is the efficiency profile (single integer versus paged payloads) and the server-side dependency for OCR, both genuinely useful behavioral facts. It does not discuss filtering combination semantics or behavior when no filters are supplied, so it stops short of 5.

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

Conciseness4/5

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

Well front-loaded: purpose and the sibling alternative come before the parameter block, and the closing "Read-only" and return note are short. The Args block is necessarily long for 11 parameters, but several lines repeat the parameter name rather than adding meaning, costing a little density.

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 an 11-parameter, fully-optional filter tool this covers everything an agent needs to call it correctly: purpose, alternative, and per-parameter meaning with the tricky date pair resolved. The 'Returns: JSON {total}' line is redundant given a real output schema exists, and no guidance is given on how multiple filters combine, leaving a small but real gap.

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 description coverage is 0%, so the description carries the full burden and largely discharges it, most valuably by disambiguating created_after/before (upload date into Immich) from taken_after/before (capture date) — a distinction the schema does not make at all. It also flags that ocr requires server-side OCR. Some entries are near-tautological ('city: Count assets from this city'), and the expected ISO format is only implied.

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?

"Count how many assets match a filter WITHOUT fetching them" gives a specific verb (count) and resource (assets), and immediately contrasts itself with search_metadata. The parenthetical example queries ('how many photos from Spain?') make the scope concrete enough to distinguish it from every other search_* sibling.

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?

Explicitly names the alternative (search_metadata) and the exact condition that selects this tool: when only the number matters. The cost rationale ('one integer instead of pages of assets') reinforces the choice, leaving nothing for the agent to infer.

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