Interface McpRunnerPlugin
public interface McpRunnerPlugin
Plugin interface for extending the MCP server with custom runners.
Third-party or domain-specific runners can implement this interface and register themselves via
PluginRegistry. Each plugin declares a unique name, a description for AI discovery, and a
schema string describing its input format.
Example implementation:
public class MyCustomRunner implements McpRunnerPlugin {
public String name() {
return "my_custom_analysis";
}
public String description() {
return "Runs custom corrosion analysis";
}
public String inputSchema() {
return "{\"type\":\"object\",\"properties\":{...}}";
}
public String run(String json) {
// Parse JSON, do calculation, return result JSON
}
}
- Version:
- 1.0
- Author:
- Even Solbraa
-
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of what this plugin does.A JSON Schema string describing the expected input format.name()The unique name of this plugin (used as the tool identifier).Executes the plugin with the given JSON input and returns JSON output.
-
Method Details
-
name
String name()The unique name of this plugin (used as the tool identifier).- Returns:
- the plugin name (alphanumeric + underscores, e.g. "corrosion_analysis")
-
description
String description()A human-readable description of what this plugin does.- Returns:
- the description (shown to the AI agent for tool selection)
-
inputSchema
String inputSchema()A JSON Schema string describing the expected input format.- Returns:
- the JSON Schema string, or empty string if unstructured
-
run
-