Class McpToolDefinition
java.lang.Object
group.worldstandard.pudel.api.agent.McpToolDefinition
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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic McpToolDefinition.Builderbuilder()execute(AgentToolContext context, Map<String, Object> parameters) Execute this tool with the given context and parameters.getName()intbooleanisAvailableIn(AgentToolContext context) Check if this tool is available in the given context.booleanisDmOnly()boolean
-
Method Details
-
getName
-
getDescription
-
getInputSchema
-
getPluginId
-
getKeywords
-
isGuildOnly
public boolean isGuildOnly() -
isDmOnly
public boolean isDmOnly() -
getPermission
-
getPriority
public int getPriority() -
getExecutor
-
execute
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
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
-