Skip to main content
Glama
skyispainted

Codepage Bridge MCP

by skyispainted

A powerful search tool built on regular expressions.

Grep

A powerful search tool for file contents.

Instructions

A powerful search tool for file contents.

Usage:

  • ALWAYS use Grep for search tasks. NEVER invoke grep or rg as a Bash command.

  • Supports full regular expressions, file glob filters, file type filters, context lines, match-only output, multiline matching, pagination, file lists, and per-file counts.

  • Use output_mode=files_with_matches when you only need file paths; this is the default.

  • Use output_mode=content to see matching lines. Line numbers are included by default.

  • Use output_mode=count to see match counts per file.

  • scan_mode=exact is the default: pagination never stops scanning, so counts are exact when scanComplete is true. scan_mode=fast is opt-in and only valid for files_with_matches; it stops each matching file at its first match and reports countsExact=false.

  • Results are limited to 250 entries by default; use head_limit and offset for pagination. Check structuredContent scanComplete, truncationReason, and outputTruncated whenever a search is resource-limited.

  • Every file is decoded according to its nearest project .encoding-rules, so legacy encoded content is searched as Unicode transparently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
-ANoShow lines after each match
-BNoShow lines before each match
-CNoShow lines before and after each match
-iNoCase-insensitive search
-nNoShow line numbers in content mode. Defaults to true.
-oNoPrint only matching non-empty parts of each line
globNoGlob pattern used to filter files, for example *.js or **/*.ts
pathNoFile or directory to search. Defaults to the current working directory.
typeNoFile type filter such as js, ts, py, rust, go, or java
offsetNoSkip the first N result lines or entries
contextNoAlias for -C
patternYesThe regular expression pattern to search for in file contents
multilineNoEnable multiline matching where dot also matches newlines
scan_modeNoexact scans all eligible files and returns exact counts when complete. fast is opt-in for files_with_matches only and stops each matching file after its first match, so counts are not exact.exact
head_limitNoLimit returned lines or entries. Defaults to 250; 0 means unlimited.
output_modeNoOutput mode. Defaults to files_with_matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • addedInput schema / properties / scan_mode
      Added value: +{
      +  "default": "exact",
      +  "description": "exact scans all eligible files and returns exact counts when complete. fast is opt-in for files_with_matches only and stops each matching file after its first match, so counts are not exact.",
      +  "enum": [
      +    "exact",
      +    "fast"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the behavioral disclosure burden. It reveals non-obvious behaviors: default output mode, default scan mode, line-number defaults, exact counting semantics, pagination limits, truncation signals, and encoding-rule handling. It even tells the agent which structuredContent fields to check when results are resource-limited.

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?

The description is organized with a short lead sentence followed by scannable usage bullets. Every sentence earns its place by conveying a distinct operational fact, and the most important routing rule is front-loaded in the first bullet.

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 16 parameters, no annotations, and no output schema, this description is remarkably complete. It covers defaults, output modes, pagination, truncation detection, encoding behavior, and search semantics. An agent can invoke the tool correctly and interpret resource-limited results without needing additional external documentation.

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?

Although the input schema already describes all 16 parameters (100% coverage), the description adds meaning beyond the schema by explaining trade-offs between output_mode values and scan_mode semantics, including the exactness consequences of fast mode. It also clarifies head_limit, offset, and the truncation fields, which enriches the schema's bare definitions.

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 opens with 'A powerful search tool for file contents,' naming a specific verb (search) and resource (file contents). It is clearly distinguishable from sibling tools Edit, Read, and Write because it explicitly frames Grep as the search tool, not a read/edit/write tool.

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?

The description gives explicit when-to-use guidance: 'ALWAYS use Grep for search tasks. NEVER invoke grep or rg as a Bash command.' It also recommends specific output_mode and scan_mode choices for different goals, such as using files_with_matches for paths only and fast scan mode for early-exit scenarios. This goes well beyond implied usage.

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

Deploy Server

Other Tools