cpp_set_codebase_path
Point the C++ analysis bridge at a source directory to index .h/.cpp files. Auto-resolves to the project's Source/ folder from a .uproject file, with path validation against traversal attacks.
Instructions
Point the C++ analysis bridge at a source directory.
If path is None (default), auto-resolves to the project's Source/ directory by scanning upward for a .uproject file, then falls back to UNREAL_PROJECT_SOURCE_PATH env var.
The path is validated to prevent directory traversal attacks. Only paths under the project root or an explicit allowed prefix are accepted.
Args: path: Absolute path to source directory. None = auto-resolve.
Returns: JSON StructuredResult with outputs: path — resolved absolute path files_indexed — number of .h/.cpp files found parser — 'tree-sitter-cpp' or 'regex-fallback'
KB: see knowledge_base/12_MCP_TOOL_USAGE_GUIDE.md#overview Example: cpp_set_codebase_path()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |