rtfm
Retrieve comprehensive, on-demand documentation for any XC-MCP tool via progressive disclosure. Provides full usage details, parameters, and examples to understand each tool's purpose and operation.
Instructions
rtfm
📖 Read The Manual - Progressive disclosure documentation system for all XC-MCP tools.
Overview
The rtfm tool provides access to comprehensive documentation for any of the 28 consolidated tools in this MCP server (v2.0+). This implements progressive disclosure: tool descriptions in the main list include full documentation (~18.7k tokens total for optimal agent understanding), while rtfm provides additional context and examples on demand.
Version History:
v1.x: 51 individual tools (~3,000-7,850 tokens depending on approach)
v2.0+: 28 consolidated tools (~18.7k tokens) - Comprehensive docs for optimal reasoning
Why rtfm?
Problem Solved: Tool documentation was originally stored in .md files within the src/ directory, which wouldn't be available in the published npm package (only dist/ is included in package.json "files" field).
Solution: Documentation is now embedded as TypeScript constants in each tool file, bundled into the compiled JavaScript, and accessible via this rtfm tool. This ensures documentation is always available, whether in development or in the published npm package.
Parameters
toolName (optional): Name of specific tool to get documentation for
Examples: "xcodebuild-build", "simctl-device", "idb-app", "cache", "persistence"
Case-sensitive, must match exact tool registration name
categoryName (optional): Browse tools in a specific category
Examples: "build", "simulator", "app", "idb", "cache", "system"
Omit both parameters to see all categories
Examples
// Get documentation for consolidated simulator device tool
rtfm({ toolName: "simctl-device" })
// Get documentation for consolidated app management tool
rtfm({ toolName: "idb-app" })
// Browse all tools in the cache category
rtfm({ categoryName: "cache" })
// View all categories (no parameters)
rtfm({})Migration from v1.x to v2.0
Old individual tools are now consolidated into single tools with operation parameters:
simctl-boot,simctl-shutdown,simctl-create,simctl-delete,simctl-erase,simctl-clone,simctl-rename→ simctl-device (operation enum)simctl-install,simctl-uninstall,simctl-launch,simctl-terminate→ simctl-app (operation enum)idb-install,idb-uninstall,idb-launch,idb-terminate→ idb-app (operation enum)cache-get-stats,cache-get-config,cache-set-config,cache-clear→ cache (operation enum)persistence-enable,persistence-disable,persistence-status→ persistence (operation enum)idb-targetsextended withidb-connectandidb-disconnectoperations
For detailed examples and parameter specifications for each operation, use rtfm({ toolName: "simctl-device" }) etc.
Response Format
Success Response
Returns full markdown documentation including:
Tool description and purpose
Advantages over direct CLI usage
Parameter specifications with types and descriptions
Usage examples
Related tools
Common patterns and best practices
Tool Not Found Response
If toolName doesn't match any registered tool:
Error message with the attempted tool name
Suggestions based on partial matches (up to 5)
Complete list of all available tools
Example:
No documentation found for tool: "simctl-boo"
Did you mean one of these?
- simctl-boot
- simctl-shutdown
Available tools (28 total):
- xcodebuild-*
- simctl-*
- idb-*
- cache
- persistence
- rtfmAvailable Tool Categories (v2.0)
Xcodebuild Tools (7)
xcodebuild-version, xcodebuild-list, xcodebuild-showsdks
xcodebuild-build, xcodebuild-clean, xcodebuild-test
xcodebuild-get-details
Simctl Lifecycle Tools (6)
simctl-list, simctl-get-details, simctl-device (consolidated: boot/shutdown/create/delete/erase/clone/rename)
simctl-suggest, simctl-health-check
Simctl App Management Tools (3)
simctl-app (consolidated: install/uninstall/launch/terminate)
simctl-get-app-container, simctl-openurl
Simctl I/O & Testing Tools (7)
simctl-io, simctl-addmedia, simctl-privacy, simctl-push
simctl-pbcopy, simctl-status-bar, screenshot
IDB Tools (6)
idb-targets (extended: list/describe/focus/connect/disconnect)
idb-ui-tap, idb-ui-input, idb-ui-gesture, idb-ui-describe, idb-list-apps
idb-app (consolidated: install/uninstall/launch/terminate)
Cache Management Tools (2)
list-cached-responses
cache (consolidated: get-stats/get-config/set-config/clear)
Persistence Tools (1)
persistence (consolidated: enable/disable/status)
Documentation Tool (1)
rtfm (this tool!)
Implementation Details
Documentation Storage
Each tool file exports a TOOL_NAME_DOCS constant containing its full documentation in markdown format:
// Example from src/tools/simctl/boot.ts
export const SIMCTL_BOOT_DOCS = `
# simctl-boot
...
`;Central Registry
All documentation constants are imported and mapped in src/tools/docs-registry.ts:
export const TOOL_DOCS: Record<string, string> = {
'simctl-boot': SIMCTL_BOOT_DOCS,
'xcodebuild-build': XCODEBUILD_BUILD_DOCS,
// ... 49 more tools
};Progressive Disclosure Pattern
Tool list shows concise descriptions (~300-400 tokens)
Each description ends with: "📖 Use rtfm with toolName: '{name}' for full documentation."
Full documentation accessed only when explicitly requested via rtfm
Prevents token overflow while maintaining comprehensive documentation access
Benefits
✅ Self-contained: No external file dependencies ✅ NPM package ready: Documentation bundled in compiled JavaScript ✅ Token efficient: Progressive disclosure keeps default views concise ✅ Always available: Works in development and production ✅ Type-safe: TypeScript constants with proper typing ✅ Searchable: Fuzzy matching with suggestions for typos ✅ Comprehensive: Full documentation including examples and parameters
Common Use Cases
Explore available tools:
// Intentionally use invalid tool name to see full list
rtfm({ toolName: "help" })Learn specific tool usage:
rtfm({ toolName: "simctl-boot" })Understand tool parameters:
rtfm({ toolName: "xcodebuild-build" })Find related tools:
// Search by category prefix
rtfm({ toolName: "simctl" }) // Shows simctl-* suggestionsRelated Tools
list-cached-responses: View cached progressive disclosure responses
cache-get-stats: Monitor cache performance and usage
Notes
Tool names are case-sensitive and must match exact registration names
Fuzzy matching provides suggestions for close matches
Documentation format is consistent markdown across all tools
Each tool's documentation is independently maintained in its source file
The TOOL_DOCS registry is automatically updated when tools are added/removed
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toolName | No | ||
| categoryName | No |