Skip to content

McpDirectoryResolver

Resolves the plain-class attribute-discovery scan set: every existing {ModuleDir}/{Module}/Mcp/ subdirectory across the app’s module directory plus any plugin-contributed module directories — mirroring the {Module}/Actions/, {Module}/Validate/ per-module convention the rest of the framework already uses, scoped to a Mcp/ subtree so this scan is cheap and doesn’t also walk every action/controller class in the app.

final class McpDirectoryResolver

SourceCompiler/McpDirectoryResolver.php
MethodDescription
[`resolve(iterablenull $moduleDirs = null): list`](#resolve)

public function resolve(iterable<string>|null $moduleDirs = null): list<string>

Defaults to [core.module_dir, …PluginManager::moduleDirectories()].

ParameterTypeDescription
$moduleDirs`iterable<string>“null`

Returns list``<``string``>