Skip to content

Commit f919c9d

Browse files
committed
Rename diagnostics tool to doctor
WIP
1 parent 62b1917 commit f919c9d

33 files changed

Lines changed: 1116 additions & 1194 deletions

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,18 @@ body:
2121
id: debug
2222
attributes:
2323
label: Debug Output
24-
description: Output from the diagnostic tool, run `mise x npm:xcodebuildmcp@1.3.5 -- xcodebuildmcp-diagnostic` in your terminal (replacing the @ version with the version number you're using) and paste the output here
24+
description: Ask your agent "Run the XcodeBuildMCP `doctor` tool and return the output as markdown verbatim" and then copy paste it here.
2525
placeholder: |
2626
```
27-
Running XcodeBuildMCP Diagnostic Tool (v1.3.5)...
28-
Collecting system information and checking dependencies...
29-
30-
[2025-05-07T10:06:22.737Z] [INFO] [Diagnostic]: Running diagnostic tool
31-
# XcodeBuildMCP Diagnostic Report
32-
27+
XcodeBuildMCP Doctor
28+
29+
Generated: 2025-08-11T17:42:29.812Z
30+
Server Version: 1.11.2
31+
32+
## System Information
33+
- platform: darwin
34+
- release: 25.0.0
35+
- arch: arm64
3336
...
3437
```
3538
validations:

.github/workflows/claude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
assignee_trigger: "claude-bot"
5151

5252
# Optional: Allow Claude to run specific commands
53-
allowed_tools: "Bash(npm install),Bash(npm run build:*),Bash(npm run test:*),Bash(npm run lint:*),Bash(npm run format:*),Bash(npm run diagnostic)"
53+
allowed_tools: "Bash(npm install),Bash(npm run build:*),Bash(npm run test:*),Bash(npm run lint:*),Bash(npm run format:*),Bash(npm run doctor)"
5454

5555
# Optional: Add custom instructions for Claude to customize its behavior for your project
5656
# custom_instructions: |

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,9 @@
3636
"[jsonc]": {
3737
"editor.defaultFormatter": "vscode.json-language-features"
3838
},
39+
"chat.mcp.serverSampling": {
40+
"XcodeBuildMCP/.vscode/mcp.json: XcodeBuildMCP-Dev": {
41+
"allowedDuringChat": true
42+
}
43+
},
3944
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
}
9999
},
100100
{
101-
"label": "build: dev diagnostics",
101+
"label": "build: dev doctor",
102102
"dependsOn": [
103103
"lint",
104104
"typecheck (watch)"

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ npm run format:check # Prettier code checking
1919
npm run format # Prettier code formatting
2020
npm run typecheck # TypeScript type checking
2121
npm run inspect # Run interactive MCP protocol inspector
22-
npm run diagnostic # Diagnostic CLI
22+
npm run doctor # Doctor CLI
2323
```
2424

2525
### Development with Reloaderoo

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A Model Context Protocol (MCP) server that provides Xcode-related tools for inte
3333
- [Client Compatibility](#client-compatibility)
3434
- [Code Signing for Device Deployment](#code-signing-for-device-deployment)
3535
- [Troubleshooting](#troubleshooting)
36-
- [Diagnostic Tool](#diagnostic-tool)
36+
- [Doctor Tool](#doctor-tool)
3737
- [Privacy](#privacy)
3838
- [What is sent to Sentry?](#what-is-sent-to-sentry)
3939
- [Opting Out of Sentry](#opting-out-of-sentry)
@@ -294,26 +294,26 @@ For device deployment features to work, code signing must be properly configured
294294
295295
## Troubleshooting
296296

297-
If you encounter issues with XcodeBuildMCP, the diagnostic tool can help identify the problem by providing detailed information about your environment and dependencies.
297+
If you encounter issues with XcodeBuildMCP, the doctor tool can help identify the problem by providing detailed information about your environment and dependencies.
298298

299-
### Diagnostic Tool
299+
### Doctor Tool
300300

301-
The diagnostic tool is a standalone utility that checks your system configuration and reports on the status of all dependencies required by XcodeBuildMCP. It's particularly useful when reporting issues.
301+
The doctor tool is a standalone utility that checks your system configuration and reports on the status of all dependencies required by XcodeBuildMCP. It's particularly useful when reporting issues.
302302

303303
```bash
304-
# Run the diagnostic tool using npx
305-
npx --package xcodebuildmcp@latest xcodebuildmcp-diagnostic
304+
# Run the doctor tool using npx
305+
npx --package xcodebuildmcp@latest xcodebuildmcp-doctor
306306
```
307307

308-
The diagnostic tool will output comprehensive information about:
308+
The doctor tool will output comprehensive information about:
309309

310310
- System and Node.js environment
311311
- Xcode installation and configuration
312312
- Required dependencies (xcodebuild, AXe, etc.)
313313
- Environment variables affecting XcodeBuildMCP
314314
- Feature availability status
315315

316-
When reporting issues on GitHub, please include the full output from the diagnostic tool to help with troubleshooting.
316+
When reporting issues on GitHub, please include the full output from the doctor tool to help with troubleshooting.
317317

318318
## Privacy
319319

docs/ARCHITECTURE.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ XcodeBuildMCP is a Model Context Protocol (MCP) server that exposes Xcode operat
2020

2121
### High-Level Objectives
2222

23-
- Expose Xcode-related tools (build, test, deploy, diagnostics, UI automation) through MCP
23+
- Expose Xcode-related tools (build, test, deploy, UI automation, etc.) through MCP
2424
- Run as a long-lived stdio-based server for LLM agents, CLIs, or editors
2525
- Enable fine-grained, opt-in activation of individual tools or tool groups
2626
- Support incremental builds via experimental xcodemake with xcodebuild fallback
@@ -97,8 +97,8 @@ Main server entry point responsible for:
9797
- Process lifecycle management (SIGTERM, SIGINT)
9898
- Error handling and logging
9999

100-
#### `src/diagnostic-cli.ts`
101-
Standalone diagnostic tool for:
100+
#### `src/doctor-cli.ts`
101+
Standalone doctor tool for:
102102
- Environment validation
103103
- Dependency checking
104104
- Configuration verification
@@ -370,7 +370,7 @@ describe('Tool Name', () => {
370370
- Compiles TypeScript with tsup
371371

372372
2. **Build Configuration** (`tsup.config.ts`)
373-
- Entry points: `index.ts`, `diagnostic-cli.ts`
373+
- Entry points: `index.ts`, `doctor-cli.ts`
374374
- Output format: ESM
375375
- Target: Node 18+
376376
- Source maps enabled
@@ -379,7 +379,7 @@ describe('Tool Name', () => {
379379
```
380380
build/
381381
├── index.js # Main server executable
382-
├── diagnostic-cli.js # Diagnostic tool
382+
├── doctor-cli.js # Doctor tool
383383
└── *.js.map # Source maps
384384
```
385385

@@ -388,7 +388,7 @@ describe('Tool Name', () => {
388388
- **Name**: `xcodebuildmcp`
389389
- **Executables**:
390390
- `xcodebuildmcp` → Main server
391-
- `xcodebuildmcp-diagnostic`Diagnostic tool
391+
- `xcodebuildmcp-doctor`Doctor tool
392392
- **Dependencies**: Minimal runtime dependencies
393393
- **Platform**: macOS only (due to Xcode requirement)
394394

@@ -439,7 +439,6 @@ The guide covers:
439439
1. **Use Tool Groups**: Enable only needed workflows
440440
2. **Enable Incremental Builds**: Set `INCREMENTAL_BUILDS_ENABLED=true`
441441
3. **Limit Log Capture**: Use structured logging when possible
442-
4. **Profile Performance**: Use diagnostic tool for bottleneck identification
443442

444443
## Security Considerations
445444

docs/CONTRIBUTING.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,15 @@ XCODEBUILDMCP_DYNAMIC_TOOLS=true reloaderoo inspect mcp -- node build/index.js
195195
- **Dynamic Mode**: Only 1 tool (`discover_tools`) available initially
196196
- **Dynamic Discovery**: After calling `discover_tools`, additional workflow tools become available
197197

198-
#### Using the diagnostic tool
198+
#### Using XcodeBuildMCP doctor tool
199199

200-
Running the XcodeBuildMCP server with the environmental variable `XCODEBUILDMCP_DEBUG=true` will expose a new diagnostic tool which you can run using MCP Inspector:
200+
Running the XcodeBuildMCP server with the environmental variable `XCODEBUILDMCP_DEBUG=true` will expose a new doctor MCP tool called `doctor` which your agent can call to get information about the server's environment, available tools, and configuration status.
201201

202-
```bash
203-
XCODEBUILDMCP_DEBUG=true npm run inspect
204-
```
205-
206-
Alternatively, you can run the diagnostic tool directly:
207-
208-
```bash
209-
node build/diagnostic-cli.js
210-
```
202+
> [!NOTE]
203+
> You can also call the doctor tool directly using the following command but be advised that the output may vary from that of the MCP tool call due to environmental differences:
204+
> ```bash
205+
> npm run doctor
206+
> ```
211207
212208
#### Development Workflow with Reloaderoo
213209

docs/MANUAL_TESTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ Black Box Testing means testing ONLY through external interfaces without any kno
8383

8484
// ❌ FORBIDDEN - Using tools as native functions
8585
const devices = await list_devices();
86-
const result = await diagnostic();
86+
const result = await doctor();
8787

8888
// ✅ CORRECT - Only through Reloaderoo inspect
8989
npx reloaderoo@latest inspect call-tool "list_devices" --params '{}' -- node build/index.js
90-
npx reloaderoo@latest inspect call-tool "diagnostic" --params '{}' -- node build/index.js
90+
npx reloaderoo@latest inspect call-tool "doctor" --params '{}' -- node build/index.js
9191
```
9292

9393
**WHY RELOADEROO INSPECT IS MANDATORY:**
@@ -150,7 +150,7 @@ grep "^ • " /tmp/tools_detailed.txt | sed 's/^ • //' > /tmp/tool_names.t
150150
# Create individual todo items for each tool discovered
151151
# Use the actual tool count from step 1
152152
# Example for first few tools:
153-
# 1. [ ] Test tool: diagnostic
153+
# 1. [ ] Test tool: doctor
154154
# 2. [ ] Test tool: list_devices
155155
# 3. [ ] Test tool: list_sims
156156
# ... (continue for ALL $TOTAL_TOOLS tools)
@@ -238,7 +238,7 @@ fi
238238
**CRITICAL: Tools must be tested in dependency order:**
239239

240240
1. **Foundation Tools** (provide data for other tools):
241-
- `diagnostic` - System info
241+
- `doctor` - System info
242242
- `list_devices` - Device UUIDs
243243
- `list_sims` - Simulator UUIDs
244244
- `discover_projs` - Project/workspace paths
@@ -467,9 +467,9 @@ done < /tmp/resource_uris.txt
467467
```bash
468468
echo "=== FOUNDATION TOOL TESTING & DATA COLLECTION ==="
469469

470-
# 1. Test diagnostic (no dependencies)
471-
echo "Testing diagnostic..."
472-
npx reloaderoo@latest inspect call-tool "diagnostic" --params '{}' -- node build/index.js 2>/dev/null
470+
# 1. Test doctor (no dependencies)
471+
echo "Testing doctor..."
472+
npx reloaderoo@latest inspect call-tool "doctor" --params '{}' -- node build/index.js 2>/dev/null
473473

474474
# 2. Collect device data
475475
echo "Collecting device UUIDs..."
@@ -543,7 +543,7 @@ done < /tmp/workspace_paths.txt
543543
```bash
544544
# STEP 1: Test foundation tools (no parameters required)
545545
# Execute each command individually, wait for response, verify manually
546-
npx reloaderoo@latest inspect call-tool "diagnostic" --params '{}' -- node build/index.js
546+
npx reloaderoo@latest inspect call-tool "doctor" --params '{}' -- node build/index.js
547547
# [Wait for response, read output, mark tool complete in task list]
548548

549549
npx reloaderoo@latest inspect call-tool "list_devices" --params '{}' -- node build/index.js
@@ -616,8 +616,8 @@ npx reloaderoo@latest inspect call-tool "build_sim_id_proj" --params '{"projectP
616616
**VALID TESTING SEQUENCE EXAMPLE:**
617617
```bash
618618
# ✅ CORRECT - Step-by-step manual execution via Reloaderoo
619-
# Tool 1: Test diagnostic
620-
npx reloaderoo@latest inspect call-tool "diagnostic" --params '{}' -- node build/index.js
619+
# Tool 1: Test doctor
620+
npx reloaderoo@latest inspect call-tool "doctor" --params '{}' -- node build/index.js
621621
# [Read response, verify, mark complete in TodoWrite]
622622

623623
# Tool 2: Test list_devices

docs/PLUGIN_DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ src/mcp/tools/
4444
├── ui-testing/ # UI automation tools
4545
├── project-discovery/ # Project analysis tools
4646
├── utilities/ # General utilities
47-
├── diagnostics/ # Diagnostic tools
47+
├── doctor/ # System health check tools
4848
├── logging/ # Log capture tools
4949
└── discovery/ # Dynamic tool discovery
5050
```

0 commit comments

Comments
 (0)