# grep_advanced

Execute grep with custom arguments (advanced usage)

Agent View of the PolicyLayer registry record for `grep_advanced`. HTML page: https://policylayer.com/tools/247arjun-mcp-grep/grep-advanced

## Facts

- Tool: `grep_advanced`
- Server: Grep MCP Server (`247arjun/mcp-grep`) — https://policylayer.com/tools/247arjun-mcp-grep.md
- Homepage: https://github.com/247arjun/mcp-grep
- Risk category: Execute (High risk)
- Registry record: grade C, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "grep_advanced",
    "arguments": {}
  }
}
```

## Why grep_advanced is rated High

This tool invokes an external command (grep) with user-controllable arguments. While grep itself is typically a read-only utility, permitting 'custom arguments' creates risk of argument injection, regex denial-of-service patterns, or exploitation of unexpected grep flags. The 'advanced usage' qualifier indicates non-trivial control over execution.

From the tool's own definition: "Tool executes grep command with 'custom arguments (advanced usage)', allowing arbitrary command-line parameters that could include flags or patterns with unintended side effects."

## Use case

AI agents invoke grep_advanced to trigger actions in Grep MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Grep MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "grep_advanced": {
      "limits": [
        {
          "counter": "grep_advanced_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Grep MCP Server (4)

- `grep_count` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-count.md
- `grep_files_with_matches` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-files-with-matches.md
- `grep_regex` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-regex.md
- `grep_search_intent` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-search-intent.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=247arjun-mcp-grep · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/247arjun-mcp-grep
