Package com.tnsai.mcp.model
Class McpToolArgs.Builder
java.lang.Object
com.tnsai.mcp.model.McpToolArgs.Builder
- Enclosing class:
McpToolArgs
Fluent builder for constructing MCP tool arguments.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the argument map.Builds and wraps in McpToolArgs for typed access.Adds an argument.Adds all entries from another map.putIfNotNull(String key, Object value) Adds an argument only if the value is not null.
-
Method Details
-
put
Adds an argument. Null values are permitted (for optional JSON fields).- Parameters:
key- the argument name (must not be null)value- the argument value (may be null)- Returns:
- this builder
-
putAll
Adds all entries from another map. -
putIfNotNull
Adds an argument only if the value is not null. -
build
Builds the argument map.- Returns:
- unmodifiable argument map
-
buildWrapped
Builds and wraps in McpToolArgs for typed access.- Returns:
- McpToolArgs wrapper
-