Search, read, and traverse the libwebrtc source tree — regex, AST symbols, references, and include graphs.
search_codeSearch Code
Regex search across the WebRTC codebase (ripgrep). Returns matching lines with file paths and line numbers.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pattern | string | required | — | Regex pattern to search for. |
glob | string | optional | — | File glob filter, e.g. "*.h", "*.cc", "api/**/*.h". |
case_sensitive | boolean | optional | true | Case-sensitive search. |
max_results | number | optional | 50 | Max results to return. |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
find_symbolFind Symbol
Find declarations of classes, structs, enums, functions, methods, fields, typedefs, or macros via the tree-sitter AST index. Returns location, signature, and qualified name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | required | — | Symbol name to search for, e.g. PeerConnectionInterface. |
kind | enum["class","struct","enum","function","method","field","typedef","macro","namespace","any"] | optional | any | Restrict to a symbol kind. |
scope | string | optional | — | Directory prefix to limit search, e.g. "api/" or "modules/audio_coding/". |
limit | number | optional | 30 | Max results (max 200). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
find_referencesFind References
AST-backed search for identifier references — type usages, qualified names, call targets — filtered by enclosing scope and file path. Skips comments and strings.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | required | — | Symbol name to find references for. |
kind | enum["all","call","type","qualified","base_class"] | optional | all | Restrict to a reference kind. |
scope | string | optional | — | Enclosing scope prefix, e.g. "webrtc::PeerConnection" or "webrtc::". |
file_glob | string | optional | — | SQL LIKE pattern for file path, e.g. "api/%" or "%/test/%". |
include_tests | boolean | optional | false | Include *test*/*mock*/*fake* files. |
limit | number | optional | 50 | Max results (max 500). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
read_fileRead File
Read a file from the WebRTC source tree (paths relative to the WebRTC root), optionally a line range.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | required | — | File path relative to WebRTC root, e.g. "api/peer_connection_interface.h". |
start_line | number | optional | — | Start line (1-based, inclusive). |
end_line | number | optional | — | End line (1-based, inclusive). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
list_directoryList Directory
List files and subdirectories in a directory of the WebRTC source tree.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | optional | (root) | Directory path relative to WebRTC root. |
recursive | boolean | optional | false | List recursively (1 level deep only). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
file_overviewFile Overview
AST-backed hierarchical outline of a C++ file: namespaces, classes/structs, enums, methods, fields, typedefs, and macros, ordered by source line.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | required | — | File path relative to WebRTC root, e.g. "api/jsep.h". |
include_members | boolean | optional | true | Include class members. |
include_macros | boolean | optional | true | Include macro definitions. |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
class_hierarchyClass Hierarchy
AST-backed lookup of parent (base) and child (derived) classes for a class. Accepts a simple or qualified name.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | required | — | Class name or qualified name, e.g. webrtc::PeerConnectionInterface. |
direction | enum["parents","children","both"] | optional | both | Traversal direction. |
limit | number | optional | 100 | Max results (max 500). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
class_membersClass Members
List methods, fields, nested types, and enum values of a specific class (qualified name preferred).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
class_name | string | required | — | Qualified name, e.g. "webrtc::SessionDescriptionInterface", or a simple name. |
kind | enum["all","method","field","enum_value","typedef"] | optional | all | Restrict to a member kind. |
include_declarations | boolean | optional | true | Include forward-only declarations along with definitions. |
limit | number | optional | 200 | Max results (max 500). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |
include_graphInclude Graph
Trace #include chains for a file: what it includes (forward) and what files include it (reverse).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | required | — | File path relative to WebRTC root, e.g. "api/jsep.h". |
direction | enum["includes","included_by","both"] | optional | both | Direction of traversal. |
max_depth | number | optional | 1 | Depth of traversal (1 = direct only, max 3). |
version | string | optional | — | libwebrtc version, e.g. "M131". Also accepts browser overlays "F133" (Firefox) / "S26" (Safari). Default: latest installed. |