Skip to main content
Glama

Trillboards DOOH Advertising

semantic_audience_search

Search screens by natural language scene description using pgvector.

Uses 768-dimensional Gemini embeddings on scene descriptions from FEIN edge AI to find screens matching a natural language query.

WHEN TO USE:

  • Finding screens by audience context ("families eating lunch in a food court")

  • Contextual ad placement based on real-time scene understanding

  • Discovering inventory matching a specific audience scenario

RETURNS: Array of matching screens ranked by semantic similarity, each with:

  • screen_id, mongo_screen_id, scene_description, contextual_relevance, similarity, created_at

EXAMPLE: semantic_audience_search({ query: "young professionals in a coffee shop looking at phones", limit: 10 })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results (default: 20, max: 100)
queryYesNatural language description of the audience/scene to search for
sinceNoTime window for scene data (e.g., "1h", "24h", "7d"). Default: "24h"
min_similarityNoMinimum semantic similarity threshold 0-1 (default: 0.5)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of results (default: 20, max: 100)"
    • addedInput schema / properties / min_similarity / description
      Added value: +"Minimum semantic similarity threshold 0-1 (default: 0.5)"
    • addedInput schema / properties / query / description
      Added value: +"Natural language description of the audience/scene to search for"
    • addedInput schema / properties / since / description
      Added value: +"Time window for scene data (e.g., \"1h\", \"24h\", \"7d\"). Default: \"24h\""
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the embedding model (Gemini), dimensionality (768), source (FEIN edge AI), return structure (array of screens with listed fields), and ranking by semantic similarity. This is substantive behavioral context, though it doesn't mention any potential quirks like rate limits or auth requirements.

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 well-structured with clear sections: purpose, technical context, WHEN TO USE, RETURNS, and EXAMPLE. Every section earns its place without redundancy. It is front-loaded with the core purpose and avoids unnecessary repetition of schema details.

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?

There is no output schema, so the RETURNS section compensates by listing the exact fields returned. The description also provides technical background and an example. It could benefit from a note on the default time window or similarity threshold, but those are covered in the schema. Overall, it is self-contained enough for an agent to invoke correctly.

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

Parameters3/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's example shows usage of query and limit but doesn't add meaning to `since` or `min_similarity` beyond their schema descriptions. The return field `contextual_relevance` and `similarity` hint at threshold behavior, but did not explicitly tie to parameters.

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 opens with a specific verb+resource+method: 'Search screens by natural language scene description using pgvector.' This clearly distinguishes it from sibling tools like semantic_search_observations (observations) and find_similar_moments (moments) by focusing on screens and audience context.

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?

A 'WHEN TO USE' section provides three concrete scenarios with examples ('families eating lunch in a food court', 'young professionals in a coffee shop'). It gives clear guidance on when to apply the tool, though it doesn't explicitly contrast with alternatives or state when not to use it.

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