Class McpToolDefinition

java.lang.Object
group.worldstandard.pudel.api.agent.McpToolDefinition

public class McpToolDefinition extends Object
MCP-compatible tool definition with JSON Schema for parameters.

Extends the legacy ToolDefinition concept with proper MCP support: - JSON Schema inputSchema for structured parameter definitions - Standard MCP tool metadata - Compatible with the Model Context Protocol specification

  • Method Details

    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getInputSchema

      public String getInputSchema()
    • getPluginId

      public String getPluginId()
    • getKeywords

      public List<String> getKeywords()
    • isGuildOnly

      public boolean isGuildOnly()
    • isDmOnly

      public boolean isDmOnly()
    • getPermission

      public AgentTool.ToolPermission getPermission()
    • getPriority

      public int getPriority()
    • getExecutor

      public McpToolExecutor getExecutor()
    • execute

      public String execute(AgentToolContext context, Map<String,Object> parameters)
      Execute this tool with the given context and parameters.
      Parameters:
      context - the agent tool context the tool runs in (guild vs DM, etc.)
      parameters - the parameter map passed to the tool (may be empty)
      Returns:
      the tool's textual output, or an error message if no executor is set
    • isAvailableIn

      public boolean isAvailableIn(AgentToolContext context)
      Check if this tool is available in the given context.
      Parameters:
      context - the agent tool context to evaluate availability against
      Returns:
      true if the tool may run in the context (guild-only / DM-only honored)
    • builder

      public static McpToolDefinition.Builder builder()