Skip to main content
Glama

merjax_search_code

Read-only

Literal / regex code search (git grep, basic regex) across a repo at a ref. The dependable way to find code on this host — works on every repo, indexed or not. Optional scoping: path (a directory or file prefix, literal), glob (git pathspec glob such as src/**/*.ts, relative to path when both are given), ignore_case, and files_only (unique files with match counts instead of lines). Returns {owner, repo, ref, total, truncated, matches: [{file, line, text}]}, or with files_only {owner, repo, ref, total, totalMatches, truncated, files: [{file, count}]}. Omit ref for the default branch.

Input Schema

NameRequiredDescriptionDefault
refNoBranch / tag / sha (default: the repo's default branch)
globNoOnly search files matching this git pathspec glob (e.g. **/*.test.ts); relative to `path` when both are given
pathNoOnly search under this repo-relative directory or file (literal prefix, e.g. src/lib)
repoYes
limitNoMax matches, or max files with files_only (default 50, max 200)
ownerYes
queryYesPattern (git grep basic regex)
files_onlyNoReturn unique files with match counts instead of matching lines
ignore_caseNoCase-insensitive match (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the read-only safety profile, and the description adds real behavioral detail beyond them: the two distinct return shapes, the `truncated` flag, and the mode switch that changes result granularity with `files_only`. It does not mention rate limits or the 200-result cap, which lives only in the schema.

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 the reason to prefer it, then scoping options, then return shapes. The return-shape enumeration is dense but earns its place given no output schema; nothing is redundant.

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?

For a 9-parameter search tool with no output schema, the description covers the essentials: what it searches, how to scope it, default branch behavior, and both response shapes. Missing only explicit sibling routing and the result cap, minor gaps against otherwise strong coverage.

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 coverage is 78%, so the schema already documents most parameters and the description largely restates it (`path` literal prefix, `glob` pathspec, `ignore_case`, `files_only`). The one genuinely additive point is the interaction rule that `glob` is relative to `path` when both are supplied; `limit` is never touched in prose.

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?

The description names a specific verb and resource ("Literal / regex code search (git grep, basic regex) across a repo at a ref") and adds a differentiator, "works on every repo, indexed or not." That implicitly separates it from indexed/semantic siblings like merjax_semantic_search and merjax_repo_search, but none are named outright.

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?

It gives a clear recommendation ("The dependable way to find code on this host") and states the condition that makes it universally applicable, plus guidance to omit `ref` for the default branch. It stops short of explicitly excluding or naming alternatives, so an agent must infer the semantic-vs-literal split.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources