Skip to content

Plugins ​

Type
Class
Namespace
craft\mcp\capabilities
Inherits
craft\mcp\capabilities\Plugins
Since
5.12.0

View source

Public Methods ​

MethodDescription
__construct()
disable()
enable()
install()
list()
uninstall()

__construct() ​

View source

Arguments ​

  • $composer
  • $generalConfig
  • $plugins
  • $updates

disable() ​

View source

Arguments ​

  • $handle

Returns ​

array{plugin: array<string,mixed>}

enable() ​

View source

Arguments ​

  • $handle

Returns ​

array{plugin: array<string,mixed>}

install() ​

View source

Arguments ​

  • $handle
  • $edition
  • $packageName (string, null) – Composer package name when the plugin is not already Composer-installed.
  • $version (string, null) – Composer version constraint when the plugin is not already Composer-installed.

Returns ​

array{plugin: array<string,mixed>}, array{composerInstalled: true, handle: string, packageName: string, restartRequired: true, instructions: string, nextToolCall: array{name: "plugins.install", arguments: array{handle: string, edition?: string}}}

list() ​

View source

Arguments ​

  • $checkUpdates

Returns ​

array{count: int, updatesChecked: bool, plugins: list<array<string,mixed>>}

uninstall() ​

View source

Arguments ​

  • $handle
  • $force

Returns ​

array{plugin: array<string,mixed>}