Skip to main content
Glama

pgvector Semantic Embeddings Search

semantic_vector_search
Read-onlyIdempotent

Run cosine similarity searches over franchise operators and menu items to answer natural-language queries, returning nearest-neighbor matches for ownership or menu concepts.

Instructions

PAID ($0.005). Perform high-dimensional cosine similarity semantic vector search across multi-unit operators and menu items using embeddings. Atomically debits $0.005. Requires 'fc_live_...' API key. Type defaults to 'operators' if omitted. 'brand' parameter is only applied when type is 'menu'. Returns 402 if balance insufficient. WHEN TO USE: Use for conceptual natural language queries (e.g. 'private equity franchisee groups in Texas' or 'spicy chicken breakfast sandwich'). WHEN NOT TO USE: Do not use for exact brand catalog keyword searches (use 'search_brands') or coordinate proximity searches (use 'franchise_search_near'). ALTERNATIVES: Use 'search_brands' for keyword catalog matching; use 'get_menu_pricing' for exact store menu lookups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoVector index target: 'operators' for ownership entities (default) or 'menu' for food items
brandNoOptional canonical brand slug to constrain menu search (e.g. 'mcdonalds', 'chickfila'). Only used when type is 'menu'.
limitNoMaximum number of nearest-neighbor results to return (default 5, max 20)
queryYesNatural language query describing desired operator profile or menu concept (e.g. 'Flynn Restaurant Group Applebees', 'spicy chicken sandwich')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesIndex target searched ('operators' or 'menu')
brandNoBrand slug constraint if applied
queryYesQuery string executed
resultsYesNearest-neighbor vector search matches with similarity scores
balance_remaining_usdYesRemaining API credit balance in USD

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.1
    • changedInput schema / properties / brand / description
      Previous value: -"Brand slug if searching menu items (e.g. 'mcdonalds')"New value: +"Optional canonical brand slug to constrain menu search (e.g. 'mcdonalds', 'chickfila'). Only used when type is 'menu'."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results (default: 5)"New value: +"Maximum number of nearest-neighbor results to return (default 5, max 20)"
    • changedInput schema / properties / query / description
      Previous value: -"Natural language search query (e.g. 'Flynn Taco Bell', 'Big Mac')"New value: +"Natural language query describing desired operator profile or menu concept (e.g. 'Flynn Restaurant Group Applebees', 'spicy chicken sandwich')"
    • changedInput schema / properties / type / description
      Previous value: -"Search target: 'operators' or 'menu'"New value: +"Vector index target: 'operators' for ownership entities (default) or 'menu' for food items"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "balance_remaining_usd": {
      +      "description": "Remaining API credit balance in USD",
      +      "type": "string"
      +    },
      +    "brand": {
      +      "description": "Brand slug constraint if applied",
      +      "type": "string"
      +    },
      +    "query": {
      +      "description": "Query string executed",
      +      "type": "string"
      +    },
      +    "results": {
      +      "description": "Nearest-neighbor vector search matches with similarity scores",
      +      "type": "array"
      +    },
      +    "type": {
      +      "description": "Index target searched ('operators' or 'menu')",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "query",
      +    "type",
      +    "results",
      +    "balance_remaining_usd"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Discloses pricing ($0.005 debit), auth requirement ('fc_live_...' key), the 402 insufficient-balance failure mode, default type behavior, and the conditional applicability of the brand parameter. These are side-effect and precondition details that annotations (readOnly/idempotent) do not cover; note the billing debit is a nuance against readOnlyHint but is a billing concern rather than a data mutation.

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?

Front-loads the cost signal and is organized into purpose, mechanics, and routing sections. Slightly redundant in restating the $0.005 debit twice ('PAID ($0.005)' and 'Atomically debits $0.005'), but no sentence is wasted.

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?

With an output schema present, return values need no explanation, and the description covers cost, auth, failure codes, defaults, and routing for a 4-parameter tool. Nothing an agent needs to call it correctly is missing.

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 description coverage is 100%, so the schema already documents type, brand, limit, and query semantics. The description adds only the type default ('operators' if omitted) and the brand-only-with-menu rule, both of which are already stated in the schema descriptions, so it does not meaningfully exceed the schema.

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?

States a specific verb and resource ('high-dimensional cosine similarity semantic vector search across multi-unit operators and menu items using embeddings') and distinguishes itself from keyword and proximity siblings by name. An agent can identify the tool's function without opening the schema.

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?

Explicit WHEN TO USE with concrete example queries, WHEN NOT TO USE naming two sibling tools by name, and an ALTERNATIVES line mapping each sibling to its purpose. Routing is fully determined.

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