Skip to main content
Glama

vectr_search

Read-onlyIdempotent

Find functions and classes by describing their behavior or concept. Returns file paths and line numbers using semantic and BM25 search.

Instructions

Use when you know WHAT you're looking for but not WHERE it is or WHAT it's called. Hybrid semantic + BM25 search — finds code by concept, behaviour, or description. Returns function/class bodies with file paths and line numbers. NOT when you already know the symbol name — use vectr_locate instead. NOT when you want call relationships — use vectr_trace instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language or code description of what you're looking for
languageNoFilter to a specific indexed language (e.g. python, rust, c, zig). Any language the index contains is accepted; an unindexed language returns no results plus the list of indexed languages.
n_resultsNoNumber of results to return (default: 5, max: 50). Prefer 1–2 for a specific symbol or single-answer lookup ("where is X defined", "the function that does Y") — the top hit is usually the answer and fewer results cost far fewer tokens. Widen to 5+ only for exploratory or survey queries where several distinct implementations are genuinely useful.
Behavior4/5

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

Annotations already indicate readOnly, idempotent, and not open world. The description adds that it returns function/class bodies with file paths and line numbers, and mentions the hybrid search algorithm, providing useful context beyond annotations.

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?

Three sentences plus two 'NOT' conditions, no extraneous content. Front-loaded with purpose and key usage direction. Every sentence earns its place.

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?

Given no output schema, the description adequately explains return values (function/class bodies with file paths and line numbers). Combined with parameter guidance and behavioral transparency, it provides a complete picture for usage.

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

Parameters5/5

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

Schema description coverage is 100%, but the description adds significant value: explains query as natural language/code, notes that unindexed language returns no results and lists indexed languages, and provides detailed usage guidance for n_results with token cost implications.

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 clearly states the tool performs hybrid semantic + BM25 search for code by concept, behavior, or description. It distinguishes from sibling tools by specifying when not to use it (symbol name -> vectr_locate, call relationships -> vectr_trace).

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?

Explicitly states when to use ('when you know WHAT... but not WHERE...') and when not to use, providing alternative tool names. Also includes parameter usage guidance, e.g., for n_results to prefer 1-2 for specific lookups.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swapnanil/vectr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server