Skip to main content
Glama

semantic_search_code

Search code repositories by semantic meaning to find relevant code symbols. Filter by programming language for targeted results.

Instructions

Semantic vector search over indexed code symbols only (no episodic memory mixed in). Optionally filter by language: "python", "typescript", "go", etc. Do NOT call for exact string matches — use search_token or grep instead. Use for concepts and natural-language queries about what code does.

repo_path: optional absolute path to the target repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
languageNo
repo_pathNo
Behavior3/5

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

No annotations are provided. The description discloses it operates only on code symbols (no episodic memory) and is read-only by nature, but lacks details on rate limits, authentication, or default behavior. Acceptable but could be improved.

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 concise sentences with front-loaded purpose and no extraneous information. Every sentence adds value.

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?

Moderate complexity with 4 parameters and no output schema. The description covers purpose, scope, and exclusions, but could benefit from hinting at return format (e.g., file paths, snippets) to fully compensate for missing output schema.

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

Parameters4/5

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

Schema description coverage is 0%. The description adds meaning for 'language' (lists examples) and 'repo_path' (optional absolute path), but does not explain 'query' or 'top_k' beyond what is implicit. Compensates partially for low coverage.

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 'semantic vector search over indexed code symbols only' and distinguishes from sibling tools like episodic_search. It provides a specific verb (search) and resource (code symbols), with optional filtering by language.

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 tells when to use ('for concepts and natural-language queries') and when not to ('Do NOT call for exact string matches') with alternatives (search_token or grep), providing clear context and exclusions.

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/ashlesh-t/cognirepo'

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