# grep_files_with_matches

List only the names of files that contain the pattern

Agent View of the PolicyLayer registry record for `grep_files_with_matches`. HTML page: https://policylayer.com/tools/247arjun-mcp-grep/grep-files-with-matches

## Facts

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

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

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

## Why grep_files_with_matches is rated Low

This tool performs a search query across files and returns matching file names as results. It retrieves information without side effects, modifying data, executing code, or destroying anything. It is a classic read operation analogous to a search or query function.

From the tool's own definition: "Tool name 'grep_files_with_matches' and description 'List only the names of files that contain the pattern' indicate a retrieval operation that outputs file names matching search criteria."

## Use case

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

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. 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_files_with_matches": {}
  }
}
```

## Other tools on Grep MCP Server (4)

- `grep_advanced` — Execute — https://policylayer.com/tools/247arjun-mcp-grep/grep-advanced.md
- `grep_count` — Read — https://policylayer.com/tools/247arjun-mcp-grep/grep-count.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
