Skip to main content
Glama

Trillboards DOOH Advertising

semantic_search_observations

Search observations by semantic similarity. Find moments that match a description like "lunch rush at fast casual restaurants" using vector embeddings.

Uses 768-dimensional Gemini embeddings on observation payloads to find promoted observations matching a natural language query via approximate nearest-neighbour (ANN) cosine similarity search over a Lance IVF_PQ index.

CONSISTENCY: results are APPROXIMATE and EVENTUALLY CONSISTENT.

  • Approximate: retrieval is ANN, not an exhaustive scan (measured recall ~0.96 against exact KNN), so an identical query may omit a borderline match.

  • Eventually consistent: the index is served from a replicated pool whose replicas refresh independently, so for up to 5 minutes after new observations are published, two identical calls may return slightly different result sets. The difference is confined to the VISIBILITY of newly-published observations; the relative ranking of already-visible ones does not change. Do not use this tool where a repeatable, exhaustive result set is required.

TIME BOUND: searches the last 30 days by default. Pass filters.time_range to widen or narrow it; the window actually applied is echoed in metadata.time_range.

WHEN TO USE:

  • Finding observations that match a conceptual description

  • Discovering contextual moments across the screen network

  • Searching for audience situations ("families waiting in line", "professionals on coffee break")

  • Finding commerce patterns ("high purchase intent near checkout")

RETURNS:

  • data: Array of matching observations ranked by semantic similarity, each with:

    • observation_id, device_id, venue_type, observation_family

    • observed_at, payload, confidence, evidence_grade

    • similarity: Cosine similarity score (0-1, higher = more relevant)

  • metadata: { result_count, query_embedding_model, search_scope, time_range }

  • suggested_next_queries: Related semantic queries to explore

EXAMPLE: User: "Find lunch rush moments at fast casual restaurants" semantic_search_observations({ query: "lunch rush at fast casual restaurants with high foot traffic", filters: { venue_type: ["restaurant_qsr"] }, limit: 20 })

User: "Find moments with high emotional engagement" semantic_search_observations({ query: "audience showing strong positive emotional reactions", filters: { observation_family: ["audience"] }, limit: 10 })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (default: 20, max: 100)
queryYesNatural language description of the observation moments to search for
filtersNoAdditional structured filters to narrow semantic search

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / filters / description
      Added value: +"Additional structured filters to narrow semantic search"
    • addedInput schema / properties / filters / properties / observation_family / description
      Added value: +"Filter by observation family: audience, vehicle, environment, commerce"
    • addedInput schema / properties / filters / properties / time_range / description
      Added value: +"Time range filter. Omitted ends default to the last 30 days (end = now, start = end - 30d) — the search is always time-bounded."
    • addedInput schema / properties / filters / properties / time_range / properties / end / description
      Added value: +"End time (ISO 8601). Default: now"
    • addedInput schema / properties / filters / properties / time_range / properties / start / description
      Added value: +"Start time (ISO 8601). Default: end - 30 days"
    • addedInput schema / properties / filters / properties / venue_type / description
      Added value: +"Filter by venue type"
    • addedInput schema / properties / limit / description
      Added value: +"Maximum results to return (default: 20, max: 100)"
    • addedInput schema / properties / query / description
      Added value: +"Natural language description of the observation moments to search for"
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden — and it does: ANN approximation with measured recall (~0.96), eventual consistency with a concrete 5-minute replica-refresh window, the precise nature of the variance (visibility of new observations, not ranking of visible ones), and a 30-day default time bound echoed in metadata.time_range.

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 in the first sentence, caveats next, usage and returns after — and each section is doing work. It is longer than strictly necessary, and the two worked examples largely restate the WHEN TO USE bullets, but the structure makes it scannable rather than sprawling.

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?

Although no output schema exists, the RETURNS section enumerates the response fields (observation_id, similarity, confidence, evidence_grade, metadata, suggested_next_queries), so an agent knows what to expect. Combined with the consistency caveats and time-boundary, nothing needed to call this correctly 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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by stating the time-bound behavior ('searches the last 30 days by default. Pass filters.time_range to widen or narrow it') and the default limit of 20, plus noting that the applied window is surfaced in metadata.time_range.

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+resource with mechanism: 'Search observations by semantic similarity' using vector embeddings on observation payloads. The scope (promoted observations, ANN cosine over a Lance IVF_PQ index) is precise. It does not explicitly distinguish itself from close siblings like query_observations, find_similar_moments, or semantic_audience_search, so an agent must infer the boundary.

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?

Contains an explicit WHEN TO USE block with four concrete scenario types, plus a hard exclusion: 'Do not use this tool where a repeatable, exhaustive result set is required.' That is when-to-use, when-not-to-use, and the tradeoff that drives the choice.

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.

Resources