MCP cdp_source_grep
Description
Searches the loaded source map's file contents for a regular expression pattern, across all files or one specific file.
Required parameters:
- pattern (string): A JavaScript regular expression pattern.
Optional parameters:
- file (string): Restrict the search to one file.
- maxResults (integer): Maximum number of matches to return. Defaults to 100.
- sessionId (string): Session id returned by cdp_session_create. Uses the active session when omitted.
See also
- HTTP cdpGrepSources (
GET /api/cdp/source/grep) - rk cdp source grep
Parameters
additionalProperties: false
| Name | Type | Required | Values |
|---|---|---|---|
| pattern | string | Yes | |
| file | string | No | |
| maxResults | integer | No | default: 100; minimum: 1 |
| sessionId | string | No |
pattern
A JavaScript regular expression pattern
file
Restrict the search to one file: absolute, or relative to the session project root
maxResults
Maximum number of matches to return
sessionId
Session id returned by cdp_session_create. Uses the active session when omitted.
Updated about 3 hours ago
Did this page help you?