Skip to content

Conversation

@cameroncooke
Copy link
Collaborator

@cameroncooke cameroncooke commented Jan 25, 2026

This PR reduces token usage exposed to LLMs by shortening tool descriptions and schema parameter descriptions. It also renames a small set of tools to reduce ambiguity and improve tool-calling accuracy.

Adds a new workflow-discovery workflow with a single manage-workflows tool to enable or disable workflows (and their tools) at runtime, allowing agents to load capabilities progressively instead of up front.

By default, workflow-discovery is only auto-included when XCODEBUILDMCP_EXPERIMENTAL_WORKFLOW_DISCOVERY=true. It can also be explicitly enabled by listing workflow-discovery in XCODEBUILDMCP_ENABLED_WORKFLOWS. This gating exists because most clients don’t yet support MCP notifications/tools/list_changed, which is required for agent harnesses to re-query the tool list after changes. The plan is to remove the flag once client support is widespread.


Note

Introduces runtime workflow management and streamlines tool interfaces to reduce token footprint and improve tool-calling.

  • Add workflow-discovery workflow with manage_workflows; auto-included only when XCODEBUILDMCP_EXPERIMENTAL_WORKFLOW_DISCOVERY=true
  • Rename UI group to ui-automation; replace describe_ui with snapshot_ui; update generated loaders and docs
  • Shorten tool descriptions and parameter .describe() strings across debugging, device, simulator, macOS, logging, discovery, scaffolding, and session-management tools
  • Consolidate session defaults and remove redundant per-call params (e.g., bundleId, platform, derivedDataPath, preferXcodebuild) from public schemas
  • Add static tools schema audit: new scripts/analysis/tools-schema-audit.ts and tools-cli schema|audit command with --json
  • Update docs (CONFIGURATION, TOOLS, dev guides, investigations) and tests to reflect renames/schemas; regenerate generated-plugins
  • Editor config: switch default formatter to Prettier

Written by Cursor Bugbot for commit a4cb731. This will update automatically on new commits. Configure here.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cameroncooke/XcodeBuildMCP/xcodebuildmcp@183

commit: a4cb731

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

vi.mock('../../../../utils/tool-registry.ts', () => ({
applyWorkflowSelection: vi.fn(),
getRegisteredWorkflows: vi.fn(),
}));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vitest mocking violates testing rules

High Severity · Bugbot Rules

The manage_workflows.test.ts file uses vi.mock, vi.fn, and vi.mocked, which violates the project's testing rules. The rules explicitly ban Vitest mocking (vi.mock, vi.fn, vi.spyOn, .mock*) and require using createMockExecutor / createMockFileSystemExecutor instead. The test mocks applyWorkflowSelection and getRegisteredWorkflows from tool-registry.ts using the forbidden patterns.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal mocking is fine, executors are for external dependency mocking

}

export async function updateWorkflows(workflowNames?: string[]): Promise<void> {
await applyWorkflowSelection(workflowNames ?? []);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused exported updateWorkflows function

Low Severity

The updateWorkflows function is exported from tool-registry.ts but never called anywhere in the codebase. It's functionally identical to calling applyWorkflowSelection directly, which is what the manage_workflows tool and registerWorkflows function already do. This dead export adds confusion without providing value.

Fix in Cursor Fix in Web

@cameroncooke cameroncooke merged commit 9ddf2d5 into main Jan 26, 2026
8 checks passed
@cameroncooke cameroncooke deleted the chore/refactor-tools branch January 26, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant