Skip to content

Commit 4e4e34d

Browse files
cameroncookeclaude
andcommitted
ref(next-steps): Keep list_schemes manifest-driven after rebase
Move list_schemes back to manifest-driven next steps while preserving\nmainline guidance improvements for run intent and compile-only flows.\n\nUpdate the manifest ordering/labels, return dynamic nextStepParams from\nthe tool, align tests, and regenerate tool docs so rendered guidance\nmatches runtime behavior. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8ca5b79 commit 4e4e34d

5 files changed

Lines changed: 47 additions & 110 deletions

File tree

docs/TOOLS-CLI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ XcodeBuildMCP provides 73 canonical tools organized into 13 workflow groups.
189189

190190
---
191191

192-
*This documentation is automatically generated by `scripts/update-tools-docs.ts` from the tools manifest. Last updated: 2026-02-16T21:53:02.251Z UTC*
192+
*This documentation is automatically generated by `scripts/update-tools-docs.ts` from the tools manifest. Last updated: 2026-02-16T22:19:28.295Z UTC*

docs/TOOLS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,4 @@ This document lists MCP tool names as exposed to MCP clients. XcodeBuildMCP prov
204204

205205
---
206206

207-
*This documentation is automatically generated by `scripts/update-tools-docs.ts` from the tools manifest. Last updated: 2026-02-16T21:53:02.251Z UTC*
207+
*This documentation is automatically generated by `scripts/update-tools-docs.ts` from the tools manifest. Last updated: 2026-02-16T22:19:28.295Z UTC*

manifests/tools/list_schemes.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ nextSteps:
1111
- label: Build for macOS
1212
toolId: build_macos
1313
priority: 1
14-
- label: Build for iOS Simulator
15-
toolId: build_sim
14+
- label: Build and run on iOS Simulator (default for run intent)
15+
toolId: build_run_sim
1616
priority: 2
17+
- label: Build for iOS Simulator (compile-only)
18+
toolId: build_sim
19+
priority: 3
1720
- label: Show build settings
1821
toolId: show_build_settings
19-
priority: 3
22+
priority: 4

src/mcp/tools/project-discovery/__tests__/list_schemes.test.ts

Lines changed: 24 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -71,40 +71,20 @@ describe('list_schemes plugin', () => {
7171
text: 'Hint: Consider saving a default scheme with session-set-defaults { scheme: "MyProject" } to avoid repeating it.',
7272
},
7373
],
74-
nextSteps: [
75-
{
76-
tool: 'build_macos',
77-
label: 'Build for macOS',
78-
params: { projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyProject' },
79-
priority: 1,
80-
},
81-
{
82-
tool: 'build_run_sim',
83-
label: 'Build and run on iOS Simulator (default for run intent)',
84-
params: {
85-
projectPath: '/path/to/MyProject.xcodeproj',
86-
scheme: 'MyProject',
87-
simulatorName: 'iPhone 16',
88-
},
89-
priority: 2,
74+
nextStepParams: {
75+
build_macos: { projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyProject' },
76+
build_run_sim: {
77+
projectPath: '/path/to/MyProject.xcodeproj',
78+
scheme: 'MyProject',
79+
simulatorName: 'iPhone 16',
9080
},
91-
{
92-
tool: 'build_sim',
93-
label: 'Build for iOS Simulator (compile-only)',
94-
params: {
95-
projectPath: '/path/to/MyProject.xcodeproj',
96-
scheme: 'MyProject',
97-
simulatorName: 'iPhone 16',
98-
},
99-
priority: 3,
81+
build_sim: {
82+
projectPath: '/path/to/MyProject.xcodeproj',
83+
scheme: 'MyProject',
84+
simulatorName: 'iPhone 16',
10085
},
101-
{
102-
tool: 'show_build_settings',
103-
label: 'Show build settings',
104-
params: { projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyProject' },
105-
priority: 4,
106-
},
107-
],
86+
show_build_settings: { projectPath: '/path/to/MyProject.xcodeproj', scheme: 'MyProject' },
87+
},
10888
isError: false,
10989
});
11090
});
@@ -175,7 +155,6 @@ describe('list_schemes plugin', () => {
175155
text: '',
176156
},
177157
],
178-
nextSteps: [],
179158
isError: false,
180159
});
181160
});
@@ -319,40 +298,20 @@ describe('list_schemes plugin', () => {
319298
text: 'Hint: Consider saving a default scheme with session-set-defaults { scheme: "MyApp" } to avoid repeating it.',
320299
},
321300
],
322-
nextSteps: [
323-
{
324-
tool: 'build_macos',
325-
label: 'Build for macOS',
326-
params: { workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyApp' },
327-
priority: 1,
328-
},
329-
{
330-
tool: 'build_run_sim',
331-
label: 'Build and run on iOS Simulator (default for run intent)',
332-
params: {
333-
workspacePath: '/path/to/MyProject.xcworkspace',
334-
scheme: 'MyApp',
335-
simulatorName: 'iPhone 16',
336-
},
337-
priority: 2,
301+
nextStepParams: {
302+
build_macos: { workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyApp' },
303+
build_run_sim: {
304+
workspacePath: '/path/to/MyProject.xcworkspace',
305+
scheme: 'MyApp',
306+
simulatorName: 'iPhone 16',
338307
},
339-
{
340-
tool: 'build_sim',
341-
label: 'Build for iOS Simulator (compile-only)',
342-
params: {
343-
workspacePath: '/path/to/MyProject.xcworkspace',
344-
scheme: 'MyApp',
345-
simulatorName: 'iPhone 16',
346-
},
347-
priority: 3,
308+
build_sim: {
309+
workspacePath: '/path/to/MyProject.xcworkspace',
310+
scheme: 'MyApp',
311+
simulatorName: 'iPhone 16',
348312
},
349-
{
350-
tool: 'show_build_settings',
351-
label: 'Show build settings',
352-
params: { workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyApp' },
353-
priority: 4,
354-
},
355-
],
313+
show_build_settings: { workspacePath: '/path/to/MyProject.xcworkspace', scheme: 'MyApp' },
314+
},
356315
isError: false,
357316
});
358317
});

src/mcp/tools/project-discovery/list_schemes.ts

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -79,52 +79,27 @@ export async function listSchemesLogic(
7979
const schemeLines = schemesMatch[1].trim().split('\n');
8080
const schemes = schemeLines.map((line) => line.trim()).filter((line) => line);
8181

82-
// Prepare next steps with the first scheme if available
83-
const nextSteps: Array<{
84-
tool: string;
85-
label: string;
86-
params: Record<string, string | number | boolean>;
87-
priority?: number;
88-
}> = [];
82+
// Prepare next-step params with the first scheme if available
83+
let nextStepParams: Record<string, Record<string, string | number | boolean>> | undefined;
8984
let hintText = '';
9085

9186
if (schemes.length > 0) {
9287
const firstScheme = schemes[0];
9388

94-
nextSteps.push(
95-
{
96-
tool: 'build_macos',
97-
label: 'Build for macOS',
98-
params: { [`${projectOrWorkspace}Path`]: path!, scheme: firstScheme },
99-
priority: 1,
89+
nextStepParams = {
90+
build_macos: { [`${projectOrWorkspace}Path`]: path!, scheme: firstScheme },
91+
build_run_sim: {
92+
[`${projectOrWorkspace}Path`]: path!,
93+
scheme: firstScheme,
94+
simulatorName: 'iPhone 16',
10095
},
101-
{
102-
tool: 'build_run_sim',
103-
label: 'Build and run on iOS Simulator (default for run intent)',
104-
params: {
105-
[`${projectOrWorkspace}Path`]: path!,
106-
scheme: firstScheme,
107-
simulatorName: 'iPhone 16',
108-
},
109-
priority: 2,
96+
build_sim: {
97+
[`${projectOrWorkspace}Path`]: path!,
98+
scheme: firstScheme,
99+
simulatorName: 'iPhone 16',
110100
},
111-
{
112-
tool: 'build_sim',
113-
label: 'Build for iOS Simulator (compile-only)',
114-
params: {
115-
[`${projectOrWorkspace}Path`]: path!,
116-
scheme: firstScheme,
117-
simulatorName: 'iPhone 16',
118-
},
119-
priority: 3,
120-
},
121-
{
122-
tool: 'show_build_settings',
123-
label: 'Show build settings',
124-
params: { [`${projectOrWorkspace}Path`]: path!, scheme: firstScheme },
125-
priority: 4,
126-
},
127-
);
101+
show_build_settings: { [`${projectOrWorkspace}Path`]: path!, scheme: firstScheme },
102+
};
128103

129104
hintText =
130105
`Hint: Consider saving a default scheme with session-set-defaults ` +
@@ -138,7 +113,7 @@ export async function listSchemesLogic(
138113

139114
return {
140115
content,
141-
nextSteps,
116+
...(nextStepParams ? { nextStepParams } : {}),
142117
isError: false,
143118
};
144119
} catch (error) {

0 commit comments

Comments
 (0)