Skip to content

Commit 4f17d66

Browse files
Teryl Tayloraraujof
authored andcommitted
docs(plugins): updated plugins documentation.
Signed-off-by: Teryl Taylor <[email protected]>
1 parent 3e3eb7b commit 4f17d66

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

docs/docs/using/plugins/index.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ PLUGIN_CONFIG_FILE=plugins/config.yaml
4646

4747
### 2. Plugin Configuration
4848

49+
The plugin configuration file is used to configure a set of plugins to run a
50+
set of hook points throughout the MCP Context Forge. An example configuration
51+
is below. It contains two main sections: `plugins` and `plugin_settings`.
52+
4953
Create or modify `plugins/config.yaml`:
5054

5155
```yaml
@@ -78,6 +82,35 @@ plugin_settings:
7882
plugin_health_check_interval: 60
7983
```
8084
85+
The `plugins` section lists the set of configured plugins that will be loaded
86+
by the Context Forge at startup. Each plugin contains a set of standard configurations,
87+
and then a `config` section designed for plugin specific configurations. The attributes
88+
are defined as follows:
89+
90+
| Attribute | Description | Example Value |
91+
|-----------|-------------|---------------|
92+
| **name** | A unique name for the plugin. | MyFirstPlugin |
93+
| **kind** | A fully qualified string representing the plugin python object. | plugins.native.content_filter.ContentFilterPlugin |
94+
| **description** | The description of the plugin configuration. | A plugin for replacing bad words. |
95+
| **version** | The version of the plugin configuration. | 0.1 |
96+
| **author** | The team that wrote the plugin. | MCP Context Forge |
97+
| **hooks** | A list of hooks for which the plugin will be executed. **Note**: currently supports two hooks: "prompt_pre_fetch", "prompt_post_fetch" | ["prompt_pre_fetch", "prompt_post_fetch"] |
98+
| **tags** | Descriptive keywords that make the configuration searchable. | ["security", "filter"] |
99+
| **mode** | Mode of operation of the plugin. - enforce (stops during a violation), permissive (audits a violation but doesn't stop), disabled (disabled) | permissive |
100+
| **priority** | The priority in which the plugin will run - 0 is higher priority | 100 |
101+
| **conditions** | A list of conditions under which a plugin is run. See section on conditions.| |
102+
| **config** | Plugin specific configuration. This is a dictionary and is passed to the plugin on initialization. | |
103+
104+
The `plugin_settings` are as follows:
105+
106+
| Attribute | Description | Example Value |
107+
|-----------|-------------|---------------|
108+
| **parallel_execution_within_band** | Plugins in the same band are run in parallel (currently not implemented). | true or false |
109+
| **plugin_timeout** | The time in seconds before stopping plugin execution (not implemented). | 30 |
110+
| **fail_on_plugin_error** | Cause the execution of the task to fail if the plugin errors. | true or false |
111+
| **plugin_health_check_interval** | Health check interval in seconds (not implemented). | 60 |
112+
113+
81114
### 3. Execution Modes
82115

83116
Each plugin can operate in one of three modes:
@@ -110,6 +143,18 @@ plugins:
110143

111144
Plugins with the same priority may execute in parallel if `parallel_execution_within_band` is enabled.
112145

146+
### 5. Conditions of Execution
147+
148+
Users may only want plugins to be invoked on specific servers, tools, and prompts. To address this, a set of conditionals can be applied to a plugin. The attributes in a conditional combine together in as a set of `and` operations, while each attribute list item is `ored` with other items in the list. The attributes are defined as follows:
149+
150+
| Attribute | Description
151+
|-----------|------------|
152+
| **server_ids** | The list of MCP servers on which the plugin will trigger |
153+
| **tools** | The list of tools on which the plugin will be applied. |
154+
| **prompts** | The list of prompts on which the plugin will be applied. |
155+
| **user_patterns** | The list of users on which the plugin will be applied. |
156+
| **content_types** | The list of content types on which the plugin will trigger. |
157+
113158
## Available Hooks
114159

115160
Currently implemented hooks:

0 commit comments

Comments
 (0)