Developer Edition Only — This content applies to the Developer Edition license.
The MCP (Model Context Protocol) bridge is how AI agents communicate with Claudius Corp. You can extend it by creating custom tools.
The McpTool Interface #
Create a class implementing McpTool:
public class MyTool implements McpTool {
@Override
public String name() { return "dmsi_my_tool"; }
@Override
public JsonObject execute(JsonObject params) {
String input = params.get("input").getAsString();
JsonObject result = new JsonObject();
result.addProperty("output", "processed: " + input);
return result;
}
}
Registering Your Tool #
Register your tool so agents can call it:
registry.register(new MyTool());
Once registered, agents can invoke your tool via JSON-RPC:
{
"jsonrpc": "2.0",
"method": "dmsi_my_tool",
"params": {"input": "hello"},
"id": 1
}
Tool Design Guidelines #
- Tool names must start with
dmsi_prefix - Accept parameters as a
JsonObject, return results as aJsonObject - Tools should be idempotent where possible — safe to retry on network timeout
- Use descriptive error messages — agents rely on them to recover
- Keep tools focused — one action per tool
For the full list of built-in tools and their contracts, see the API Documentation.
