New Your team’s decisions, in one playbook every coding agent works from. Never answer your agent twice

search_code_semantic

[SUPPORT] 93fce816 — Cursor-style LOCAL semantic code search over a source tree, entirely in a DuckDB sidecar (no cloud round-trip). Parses Python (stdlib ast) and TypeScript/JavaScript (tree-sitter) into SEMANTIC CHUNKS at function/class/method boundaries PLUS the un-named logical blocks that a ...

SERVERMeridian SOURCE@meridianmcp/mcp
Low RISK CLASS
Category Read
Parameters 52 required
Recommended Allowedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/io-github-ajc3xc-meridian/search-code-semantic.md

What search_code_semantic does on Meridian

AI agents call search_code_semantic to retrieve information from Meridian without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

ParameterTypeRequiredDescription
kind string Optional chunk-kind filter: one of 'function', 'class', 'method', 'interface', 'enum', 'module'.
limit integer Max ranked hits to return (default 10).
query string Yes The search query — keywords and/or a natural-language description of the code you want to find.
reindex boolean Default true — run an incremental Merkle-diff reindex before searching so results reflect the current tree. Set false to search the last-built index as-is.
root_dir string Yes Absolute path to the source-tree root to index and search (walked recursively; vendored/build dirs like node_modules/.git/dist are pruned).

Parameters from the server's own tool schema.

Why search_code_semantic is rated Low

This tool retrieves and queries code semantically from a local source tree. It is purely informational—searching for patterns or terms in code without side effects. The description emphasizes read-only operations (parsing, searching, finding) with incremental optimization via merkle trees for efficiency. No write, execute, destructive, or financial operations are indicated.

From the tool's definition Performs semantic code search over a source tree with DuckDB sidecar; described as retrieval operation ('search') with no modification or deletion capabilities. The tool 'parses' and queries code semantically but does not create, update, or delete data.

Risk signalsAdmin/system-level operation

Questions about search_code_semantic

What does the search_code_semantic tool do? +

[SUPPORT] 93fce816 — Cursor-style LOCAL semantic code search over a source tree, entirely in a DuckDB sidecar (no cloud round-trip). Parses Python (stdlib ast) and TypeScript/JavaScript (tree-sitter) into SEMANTIC CHUNKS at function/class/method boundaries PLUS the un-named logical blocks that a named-symbols-only graph search can't reach (module-level dict/list literals, bare calls, __main__ guards, imports) — so a term that only appears in a bare top-level call is still findable. Incremental by a content MERKLE TREE: the root hash is compared first and only divergent subtrees are walked, so only the files that actually changed since the last pass are re-chunked (repeat calls on an unchanged tree are near-free). Search is HYBRID — DuckDB native FTS (Okapi BM25) for keyword match, fused via Reciprocal Rank Fusion with an OPTIONAL local-embedding vector leg (DuckDB VSS / HNSW cosine over a Model2Vec static model) when MERIDIAN_CODE_INDEX_VECTORS is enabled; with vectors off (the default) it is a complete pure-BM25 code search. Returns {root_dir, query, total_indexed, vectors_enabled, vectors_active, hits:[{chunk_id, path, language, kind, name, line_start, line_end, content, score, bm25, bm25_rank, vector_rank}]}. A missing dir / empty tree returns an empty hits list, never an error. It is categorised as a Read tool in the Meridian MCP Server, which means it retrieves data without modifying state.

What parameters does search_code_semantic accept? +

search_code_semantic accepts 5 parameters: kind, limit, query, reindex, root_dir. Required: query, root_dir. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on search_code_semantic? +

Register the Meridian MCP server in PolicyLayer and add a rule for search_code_semantic: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Meridian. Nothing to install.

What risk level is search_code_semantic? +

search_code_semantic is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit search_code_semantic? +

Yes. Add a rate_limit block to the search_code_semantic rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block search_code_semantic completely? +

Set action: deny in the PolicyLayer policy for search_code_semantic. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides search_code_semantic? +

search_code_semantic is provided by the Meridian MCP server (@meridianmcp/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Meridian, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Meridian's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.