MCP server for Swift code analysis and project exploration. Provides tools for analyzing Swift projects, finding symbols, examining type hierarchies, detecting test cases, and searching code.
Swift-Selena provides 15 tools for Swift code analysis with clear naming (verb-starting: initialize, find, search, list, analyze, get) and generally consistent schemas. However, descriptions are concise but somewhat generic, parameter descriptions lack depth, and output schemas are not formally documented. Tools follow a pattern but lack the LLM-optimization guidance needed for A-grade production tools. Several tools have no required parameters, which reduces clarity around expected input. Error handling is present but basic. The server demonstrates competent engineering but lacks polish in the areas that matter most for agentic tool selection and chaining.
Analyze import dependencies across the project
Execute a Swift analysis tool with parameters
Find Swift files in the project by pattern (glob-like search)
Find where a symbol is defined
Find test cases (XCTest and Swift Testing @Test) in the project
Get the full JSON schema for a specific tool
Get the inheritance hierarchy for a specific type
Initialize a Swift project for analysis. Must be called first.
Output schemas are not formally documented. Tools return text or structured data (as seen in AnalyzeImportsTool and FindTestCasesTool returning formatted text), but the MCP tool definitions do not include outputSchema declarations. LLMs cannot understand the return type structure and must infer output format from descriptions alone, reducing composability.
Parameter descriptions are minimal or absent. While some parameters like 'pattern' in search_code have descriptions, many tools like list_symbols, list_property_wrappers, and list_extensions only declare a single 'file_path' parameter with minimal explanation of what symbol, property, or extension data will be returned. Descriptions lack LLM-optimized guidance on WHEN to use each tool vs. similar ones.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 52 | <=2025-11-25 | v2 |
List all available Swift analysis tools (name and description only, no full schema)
List extensions and their members in a file
List @State, @Binding etc.
List protocol conformances
List all symbols in a file
Search code content using regex (grep-like). Supports output_mode, limit, include_patterns, exclude_patterns (glob).
Find files that do NOT match the given pattern (like grep -L). Supports include_patterns / exclude_patterns (glob).
Meta-tools (execute_tool, get_tool_schema, list_available_tools) have generic descriptions. execute_tool states 'Execute a Swift analysis tool with parameters' but does not explain why an LLM would call this instead of calling the tool directly. LLMs may not understand that these tools enable tool discovery and dynamic invocation, critical for extensibility but not conveyed.
No error recovery guidance. Tools do not include error descriptions that tell the LLM what to do if a file is not found, a pattern matches nothing, or parsing fails. A bare error response forces the agent to guess, e.g. 'No imports found' could mean the project is empty or the tool failed silently.
Tool naming ambiguity: find_files, find_symbol_definition, and find_test_cases all start with 'find' but operate on different scopes (by pattern, by name, by test framework). While technically correct, no descriptions clarify when to use find_files vs. search_code, both can locate code, but one works by filename pattern, the other by content. LLMs may conflate them.
initialize_project is marked as a prerequisite but not enforced in tool definitions. The description states 'Must be called first', but there is no mechanism (e.g., error handling or parameter validation) to ensure tools fail gracefully if called without initialization. An LLM might skip initialization and hit silent failures.