Skip to main content
Glama
LiteDB desktop

LiteDB desktop

Semantic search

semantic_search
Read-only

Finds rows by meaning in a vector column, via locally embedded text or a similar row. Keeps text on your machine and returns nearest neighbours.

Instructions

Nearest-neighbour search over a pgvector column. Give text to search by meaning, it is embedded by a model running on this machine, so the text never leaves it, or row_id to find rows similar to an existing one. The first text search downloads the embedding model (~23 MB for the default) and may take a minute.

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": {
      "table": "<table>",
      "column": "<column>"
    },
    "name": "semantic_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoText to search for. Embedded locally. Not with row_id.
limitNoDefault 10.
tableYesTable holding the vector column.
columnYesThe vector column to search.
metricNoDistance operator: cosine (default), L2, or inner product.
row_idNoPrimary key of a row to find neighbours of.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely new operational facts an agent cannot get elsewhere: embedding runs on-machine so text never leaves the host, and the first text search triggers a ~23 MB model download that 'may take a minute'. That latency warning is exactly the kind of behavior that prevents an agent from timing out or retrying a slow first call.

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?

Three sentences, front-loaded with the core purpose and no filler. The middle sentence is comma-spliced and nests the embedding/privacy rationale inside the text-vs-row_id instruction, which makes it slightly harder to parse than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter retrieval tool with no output schema, the description never indicates what comes back — row identifiers, distances, full rows, or ranked order. It does cover the high-risk unknowns (latency, privacy, mode selection), but the absent return-shape information leaves a real gap given no output schema exists.

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%, including the text/row_id exclusivity note, so the schema already carries the parameter meaning. The description restates the text-vs-row_id split but says nothing about `metric` operator semantics, `limit` behavior, or how `table`/`column` combine — baseline 3 applies.

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?

Starts with a specific verb+resource: 'Nearest-neighbour search over a pgvector column', which is far more precise than the title alone. It never names or contrasts with the adjacent `query` or `list_vector_columns` tools, so an agent must infer on its own when vector search beats a SQL query.

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?

Clearly explains the two mutually exclusive modes — supply `text` to search by meaning, or `row_id` to find neighbours of an existing row. It gives no guidance on when to reach for this tool versus sibling tools like `query` or `execute_approved`, so the usage framing is complete within the tool but not across the toolset.

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