MCP Tools List#
find_occurences#
Finds all occurrences of a symbol in the workspace. Use it for semantic symbol search across the workspace. This tool understands PHP semantics, infers types to provide better results, and looks semantically into documentary comments and string literals.
Parameters: - symbolFqn: (required) The symbol name to find occurrences for. This must be a valid fully qualified identifier (in case of class or function, it must contain full namespaced name). - kind: (required) The kind of symbol to find occurrences for.
search_symbol#
Searches for symbols (classes, methods, fields, functions). Use this tool to lookup a symbol by its identifier even it's known partially. Results include declaration location when available (0-based line/column), symbol kind, known documentation, and declaration snippet
Parameters: - q: (required) The search query. Can be a short name, a fully qualified name, or a fragment of a name. Use double colon (::) to separate declaring type and member name. Prefix identifier with dollar ($) to indicate a variable or a property. - limit: The maximum number of results to return. Default is 100.
analyze_calls#
Builds the IDE Call Hierarchy tree for a method, function, or constructor. Use it to see who calls a symbol ("direction": "incoming") or what the symbol calls ("direction": "outgoing").
Prefer this tool over usage search, text search, or regex search when evaluating dependencies by actual calls. It uses IDE call hierarchy data, so it provides more precise call relationships with less noise and fewer follow-up calls than primitive searches.
Pass "symbolFqn" as a fully qualified name, for example "\strlen". If you only know a short name or fragment, use search_symbol first to find the target.
The result is a tree structured object. Each node includes "uri" and "symbolFqn". Pass "symbolFqn" back to render the subtree. Symbols can come from workspace, included PHAR files, built-in PHP manual, or required Composer packages.
Parameters: - symbolFqn: (required) Plain fully qualified function name or method name. If you only know a short name or fragment, use search_symbol first and pass the best matching symbolFqn name here. Do not pass a file path, line, column, or call signature. - direction: (required) The direction of the call analysis. - depth: The depth of the call analysis. - uri: The current file URI used as a hint in case of ambiguity.
get_file_problems#
Returns all problems (errors, warnings, diagnostics) found in a file.
Parameters: - filePath: (required) The path or URI of the file without your workspace to analyze for problems.
get_composer_dependencies#
Returns Composer packages installed in the project and their exact versions. Reads from the already-indexed composer.lock data.
Use this to determine which libraries and versions are available before generating code.
Parameters: - nameFilter: Optional filter for package names, case-insensitive. Can contain wildcard characters (e.g. "phpunit/*", "symfony/console").
php_version#
Returns the PHP version of the current workspace.