Skip to main content
Glama

vector_search

Read-onlyIdempotent

Run semantic search over a vector index to return the top_k closest documents for a query. Specify a workspace or use the default, and set top_k to control results.

Instructions

Semantic search over a vector index. Returns the top_k closest documents.

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": {
      "index": "<index>",
      "query": "<query>"
    },
    "name": "vector_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYes
queryYes
top_kNoResults to return (1-20).
workspaceNoNamed workspace. Omit to use the default workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds ranking semantics ('closest documents') but says nothing about whether the query is embedded server-side, which embedding model or distance metric applies, or what happens on a missing index. Useful but thin beyond the annotations.

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?

Two sentences, front-loaded with the operation and followed by the result shape; no filler. It is tight, but slightly too tight given the gaps it leaves, so not a 5.

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

Completeness2/5

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

A four-parameter retrieval tool with no output schema and half its parameters undocumented. The description never clarifies what `index` refers to or whether `query` is raw natural language, which are exactly the things an agent needs before calling it.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: `top_k` and `workspace` are described in the schema, but `index` and `query` are bare in both places. The description's only parameter-adjacent content restates top_k, adding nothing the schema does not already say about what an index name is or what form the query takes.

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: 'Semantic search over a vector index', plus the return shape ('top_k closest documents'). That is enough to distinguish it from the sibling catalog/cluster/job tools, though it never explicitly names or contrasts an alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites, no exclusions. The agent must infer that this is the tool for similarity lookup versus the listing/describe siblings, and there is no statement about when a different search approach would be preferred.

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