Package burp.mcp.tool
Class McpToolRegistry
java.lang.Object
burp.mcp.tool.McpToolRegistry
Registry of all MCP tools. Routes tool calls to implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCall a tool by name with the given arguments.static StringcanonicalName(String name) Canonicalize a tool name for permission checks, metrics, and dispatch.Get a specific tool by name.Return the names of all registered tools.List all registered tools as JSON-compatible Maps.voidRegister a single tool.voidRegister all tools from all categories.static StringresolveAlias(String name) Resolve common user-facing aliases to canonical tool names.intReturn the number of registered tools.
-
Constructor Details
-
McpToolRegistry
public McpToolRegistry(burp.api.montoya.MontoyaApi api)
-
-
Method Details
-
register
Register a single tool. -
registerAllTools
public void registerAllTools()Register all tools from all categories. -
toolCount
public int toolCount()Return the number of registered tools. -
getToolNames
Return the names of all registered tools. -
getTool
Get a specific tool by name. Returns null if not found. -
resolveAlias
Resolve common user-facing aliases to canonical tool names. Public so the server permission gate can canonicalize before checking. -
canonicalName
Canonicalize a tool name for permission checks, metrics, and dispatch. Null-safe: returns null when input is null. -
listTools
List all registered tools as JSON-compatible Maps. -
callTool
Call a tool by name with the given arguments. Returns the tool result as an Object (JSON-serializable).- Throws:
McpError
-