get_build_errors
Retrieve build errors and warnings from the last Xcode build for a given project or workspace. Optionally filter output using regex and control line count.
Instructions
Get the build errors from the last build for the specified Xcode project or workspace.
Args:
project_path: Path to an Xcode project or workspace directory.
include_warnings: Include warnings in output. If not provided, uses global setting.
regex_filter: Optional regex to filter error/warning lines
max_lines: Maximum number of error/warning lines to show (default 25)
Returns:
If no build has been performed: Returns plain text message.
Otherwise, returns JSON string with format:
{
"full_log_path": "~/Library/Caches/xcode-mcp-server/logs/build-{hash}.txt",
"summary": {"total_errors": N, "total_warnings": M, "showing_errors": X, "showing_warnings": Y},
"errors_and_warnings": "Build succeeded/failed with N errors...
error: ... ..." } Output is filtered using regex patterns to match compiler errors/warnings, with errors prioritized over warnings. Includes full unfiltered log file for complete analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| include_warnings | No | ||
| regex_filter | No | ||
| max_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |