# scan_patterns

在代码库中搜索任意正则表达式 pattern，支持 Python/TypeScript/JavaScript/任意文本文件。

Agent View of the PolicyLayer registry record for `scan_patterns`. HTML page: https://policylayer.com/tools/0xyubo-ripple-mcp/scan-patterns

## Facts

- Tool: `scan_patterns`
- Server: Ripple-MCP (`0xyubo/ripple-mcp`) — https://policylayer.com/tools/0xyubo-ripple-mcp.md
- Homepage: https://github.com/0xYubo/Ripple-Mcp
- Risk category: Read (Low risk)
- Registry record: grade B, 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": "scan_patterns",
    "arguments": {}
  }
}
```

## Why scan_patterns is rated Low

This is a search/query operation that retrieves information about code patterns. It has no side effects, does not execute code, does not modify data, and does not delete anything. While regex searches could theoretically be CPU-intensive, the risk of misuse by an AI agent is minimal since the worst outcome is retrieving information about code structure.

From the tool's own definition: "Tool description states it 'searches' (搜索) for regex patterns in a codebase across multiple languages. The operation is purely informational—it 'scans' and retrieves matching code locations without modifying, executing, or deleting anything."

## Use case

AI agents call scan_patterns to retrieve information from Ripple-MCP 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 Ripple-MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "scan_patterns": {}
  }
}
```

## Other tools on Ripple-MCP (5)

- `analyze_python_ast` — Read — https://policylayer.com/tools/0xyubo-ripple-mcp/analyze-python-ast.md
- `find_definition` — Read — https://policylayer.com/tools/0xyubo-ripple-mcp/find-definition.md
- `generate_impact_report` — Read — https://policylayer.com/tools/0xyubo-ripple-mcp/generate-impact-report.md
- `get_code_context` — Read — https://policylayer.com/tools/0xyubo-ripple-mcp/get-code-context.md
- `trace_callers` — Read — https://policylayer.com/tools/0xyubo-ripple-mcp/trace-callers.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=0xyubo-ripple-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xyubo-ripple-mcp
