Skip to main content
Glama
codedev-mcp

codedev-mcp

by Kranthithota

search_code

Read-onlyIdempotent

Search codebases by text or regex to locate matching file paths, line numbers, and content. Narrow results by directory, file type, whole word, case sensitivity, or context lines.

Instructions

Fast text or regex search across the entire codebase. Uses ripgrep for speed. Returns file paths, line numbers, and matched content. Works with any programming language.

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": {
      "pattern": "<pattern>"
    },
    "name": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternYesSearch pattern (text or regex)
is_regexNoTreat pattern as regex (default: false)
directoryNoSubdirectory to search within
file_globNoFilter by file pattern, e.g. "*.py", "*.ts", "*.java"
whole_wordNoMatch whole words only (default: false)
max_resultsNoMaximum results to return (default: 50)
context_linesNoLines of context before/after each match (default: 0)
case_sensitiveNoCase-sensitive search (default: false)

Output Schema

NameRequiredDescriptionDefault
totalYes
matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.5

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so the safety profile is fully covered. The description adds only the ripgrep implementation detail and the shape of matches; it says nothing about result caps, truncation, or performance limits beyond what the schema defaults already state.

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?

Four short sentences with the core capability front-loaded and no wasted preamble. 'Uses ripgrep for speed' and 'Works with any programming language' are light filler but brief enough not to bloat the definition.

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?

An output schema exists, so the brief return-value summary is optional and the description need not elaborate further. All eight parameters are schema-documented and the purpose is unambiguous; the only real gap is the absent comparison to the semantic and symbol search siblings.

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 description coverage is 100%, so all eight parameters including defaults for is_regex, whole_word, max_results, and context_lines are already documented in the schema. The description adds no syntax, format, or interaction detail beyond that, so the baseline of 3 applies.

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 — text or regex search across the codebase — and adds scope notes (ripgrep-backed, any language). It does not name or contrast with siblings like semantic_search or search_symbols, so the lexical-vs-semantic distinction is only implied.

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

Usage Guidelines3/5

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

The phrase 'text or regex search' implicitly signals exact/lexical matching rather than semantic lookup, which is useful context for choosing between search tools. However, there is no explicit when-to-use or when-not guidance and no named alternative, leaving the agent to infer the routing decision.

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