Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Clear Cache

cache-clear
DestructiveIdempotent

Purge cached simulator, project, or response data to force fresh retrieval and resolve stale-state issues after Xcode changes.

Instructions

cache-clear

🗑️ Clear cached data to force fresh retrieval and resolve stale state - Purge cache systems.

Removes all entries from the specified cache system(s). Forces fresh data retrieval on the next operation. Useful for troubleshooting stale cache issues, resetting learned patterns, or clearing memory after major project changes. Can target individual caches or clear all at once.

Advantages

• Force fresh data after major Xcode project changes (new targets, schemes, build settings) • Resolve issues caused by stale cached simulator or project data • Clear memory before performance testing to establish baseline • Reset learned patterns when switching between project configurations

Parameters

Required

  • cacheType (string): Which cache to clear - "simulator", "project", "response", or "all"

Optional

  • (None)

Returns

  • Tool execution results with clear operation confirmation

  • Results per cache type showing successful clearing

  • Timestamp of cache clearing

  • cache-get-stats: Monitor cache before clearing

  • cache-set-config: Configure cache retention

  • cache-get-config: View cache configuration

Notes

  • Tool is auto-registered with MCP server

  • Operation is immediate and irreversible

  • Clearing all caches forces fresh retrieval on all tools

  • Use before performance benchmarking

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cacheTypeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0
  2. Removedv1.1.0
  3. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark the tool as destructive and idempotent, but the description goes further by stating the operation is 'immediate and irreversible' and that clearing all caches forces fresh retrieval on all tools. This adds meaningful behavioral context beyond the structured metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with headings and front-loads the core behavior. However, it repeats the same ideas ('force fresh data', 'purge cache systems', 'clearing all caches forces fresh retrieval') and includes an irrelevant 'Tool is auto-registered with MCP server' note, so not every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter destructive tool, the description covers the parameter, return structure, side effects, use cases, and related tools. The main gap is the contradictory required/optional labeling and thin per-cache-type semantics, but the essential invocation details are present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description merely restates the enum values already present in the input schema and adds little semantic depth about what 'simulator', 'project', or 'response' caches actually contain. It also labels cacheType as Required while the schema/context signals report zero required parameters, which is misleading rather than helpful.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific action ('Removes all entries') on a clear resource ('cache system(s)') and states the outcome ('force fresh retrieval'). It also distinguishes itself by listing cache-get-stats, cache-get-config, and cache-set-config as related tools, making the role of cache-clear unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'Advantages' section provides concrete scenarios: stale cache issues, major Xcode project changes, performance baseline testing, and switching configurations. It lacks explicit when-not-to-use guidance or direct comparisons with cache-set-config/cache-get-stats, so it falls just short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.