This document outlines the specification for tools within the Plugin System module that are intended to be integrated with the Model Context Protocol (MCP).
- Tool Integration: This module provides plugin architecture for extending Codomyrmex functionality.
- Configuration: Plugins are discovered from configured directories and can have their own configurations.
Lists all available plugins with their metadata, status, and capabilities.
list_plugins
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
plugin_type |
string |
No | Filter by plugin type | "analyzer" |
status |
string |
No | Filter by status ("active", "disabled", "error") | "active" |
include_disabled |
boolean |
No | Include disabled plugins (default: true) | true |
| Field Name | Type | Description | Example Value |
|---|---|---|---|
plugins |
array[object] |
List of plugin information | See below |
total_count |
integer |
Total number of plugins | 12 |
active_count |
integer |
Number of active plugins | 10 |
Plugin object structure:
| Field Name | Type | Description |
|---|---|---|
name |
string |
Plugin identifier |
version |
string |
Plugin version |
description |
string |
Plugin description |
plugin_type |
string |
Type (analyzer, formatter, exporter, etc.) |
status |
string |
Current status |
dependencies |
array[string] |
Required dependencies |
author |
string |
Plugin author |
- Returns empty list if no plugins are available
- Idempotent: Yes
{
"tool_name": "list_plugins",
"arguments": {
"plugin_type": "analyzer",
"status": "active"
}
}- Plugin Verification: Plugins should be verified before installation
- Sandbox Execution: Consider sandboxing plugin code execution
Loads and activates a plugin by name or path.
load_plugin
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
plugin_name |
string |
Yes | Name or path of the plugin | "my-analyzer" |
config |
object |
No | Configuration to pass to the plugin | {"verbose": true} |
validate_only |
boolean |
No | Validate without loading | false |
| Field Name | Type | Description | Example Value |
|---|---|---|---|
status |
string |
"loaded", "validated", or "error" | "loaded" |
plugin_info |
object |
Plugin metadata after loading | See plugin object |
validation_errors |
array[string] |
Validation issues if any | [] |
warning_messages |
array[string] |
Non-critical warnings | ["Deprecated API used"] |
- Plugin Not Found: Returns error if plugin cannot be located
- Dependency Missing: Returns error with missing dependencies list
- Security Violation: Returns error if plugin fails security scan
- Load Error: Returns error with details if plugin fails to initialize
- Idempotent: Yes, loading an already-loaded plugin returns success
Unloads and deactivates a currently loaded plugin.
unload_plugin
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
plugin_name |
string |
Yes | Name of the plugin to unload | "my-analyzer" |
force |
boolean |
No | Force unload even if in use | false |
| Field Name | Type | Description |
|---|---|---|
status |
string |
"unloaded" or "error" |
cleanup_performed |
boolean |
Whether cleanup hooks were called |
- Plugin Not Loaded: Returns error if plugin is not currently loaded
- In Use: Returns error if plugin is in use and force is false
- Idempotent: Yes
Executes a registered hook across all plugins that implement it.
execute_plugin_hook
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
hook_name |
string |
Yes | Name of the hook to execute | "pre_analysis" |
arguments |
object |
No | Arguments to pass to hook handlers | {"file_path": "..."} |
plugin_filter |
array[string] |
No | Only execute for specific plugins | ["plugin-a"] |
| Field Name | Type | Description |
|---|---|---|
status |
string |
"success", "partial", or "error" |
results |
array[object] |
Results from each plugin |
errors |
array[object] |
Errors from failed handlers |
- Hook Not Found: Returns info if no plugins implement the hook
- Handler Errors: Continues execution, collects all errors
- Idempotent: Depends on hook implementation
Gets detailed status information for a specific plugin.
get_plugin_status
| Parameter Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
plugin_name |
string |
Yes | Name of the plugin | "my-analyzer" |
include_metrics |
boolean |
No | Include usage metrics | true |
| Field Name | Type | Description |
|---|---|---|
plugin_info |
object |
Full plugin metadata |
state |
string |
Current state (loaded, active, disabled, error) |
config |
object |
Current configuration |
metrics |
object |
Usage metrics (if requested) |
last_error |
string |
Last error message if any |
- Plugin Not Found: Returns error if plugin doesn't exist
- Idempotent: Yes
- Parent: Project Overview
- Module Index: All Agents
- Documentation: Reference Guides
- Home: Root README