Update mcp tool universe
This commit is contained in:
19
src/main/java/mcp/tools/helper/QueryValidator.java
Normal file
19
src/main/java/mcp/tools/helper/QueryValidator.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package mcp.tools.helper;
|
||||
|
||||
import io.modelcontextprotocol.spec.McpSchema;
|
||||
import mcp.util.Result;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Interface for validating tool queries (arguments) against a schema.
|
||||
*/
|
||||
public interface QueryValidator {
|
||||
/**
|
||||
* Validates the given arguments against the provided schema.
|
||||
*
|
||||
* @param schema The JSON schema to validate against.
|
||||
* @param arguments The tool arguments to validate.
|
||||
* @return A {@link Result} indicating success (Ok(null)) or failure (Err(exception)).
|
||||
*/
|
||||
Result<Void, Exception> validate(McpSchema.JsonSchema schema, Map<String, Object> arguments);
|
||||
}
|
||||
Reference in New Issue
Block a user