Skip to main content
Glama

Islam West Africa Collection (IWAC)

Semantic search for photographs

semantic_search_images
Read-onlyIdempotent

Find photographs by describing what they SHOW, in any language ('mosquée en construction', 'street signage in Arabic'). This is cross-modal: the ranking runs against a multimodal embedding of the photograph itself, not against a caption, so it works even though only 2 of the 30 images have one. Runs the corpus model, EmbeddingGemma 2, locally with no API key (first use downloads ~350 MB). similarity_score only ranks within one 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": "semantic_search_images"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoDefault 10, max 30
queryYesDescription of the visual content, any language
countryNoExact country name: Benin | Burkina Faso | Côte d'Ivoire | Niger | Nigeria | Togo (accents optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / query / maxLength
      Previous value: -8192New value: +2000
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, closed-world behavior, so the bar is lower, and the description still adds real operational context: the model runs locally with no API key and a first-use ~350 MB download. The note that similarity_score is only comparable within a single query is a valuable caveat beyond the annotations, though latency after download is unstated.

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?

Four sentences, well front-loaded: purpose first, then mechanism, then runtime cost, then scoring caveat. The caption-coverage detail ("only 2 of the 30 images have one") is corpus-specific but does the work of justifying why cross-modal matters; nothing is clearly redundant.

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 three-parameter read-only search over a small image corpus, the description covers the retrieval model, the runtime/download requirement, and the interpretation limits of the returned score. With full schema coverage and no output schema, an agent has everything needed to invoke it correctly.

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 100%, so the baseline is 3; the description adds meaning by clarifying that `query` should be phrased as a description of visible content rather than keywords, and gives multilingual examples. `country` and `limit` receive no narrative treatment, leaving that half of the parameter set to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Find photographs") plus the essential differentiator: the query describes what the image SHOWS, not metadata or captions. The cross-modal embedding mechanism makes the retrieval model unambiguous. It stops short of naming the sibling keyword tool (search_images), so the agent must infer which image-finding tool to pick.

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?

Gives clear when-to-use context: use it for visual-content queries in any language, and it works even when captions are absent (2 of 30 images). What is missing is an explicit exclusion or pointer to the lexical alternative for name/date/keyword lookups.

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.