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 Type
    Method
    Description
    A human-readable description of what this plugin does.
    A JSON Schema string describing the expected input format.
    The unique name of this plugin (used as the tool identifier).
    run(String json)
    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

      String run(String json)
      Executes the plugin with the given JSON input and returns JSON output.
      Parameters:
      json - the input JSON string
      Returns:
      the output JSON string (should follow ApiEnvelope format)