Class McpCompletionRequest
java.lang.Object
org.apache.juneau.rest.server.mcp.McpCompletionRequest
Revision-neutral invocation of an
McpCompleter.
Supersedes the wire-level CompleteRequest bean. Built by a dated adapter after it has
validated the incoming completion/complete request and resolved the target
McpCompleter; by the time an adapter constructs one of these, getValue() is
guaranteed non-
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe name of the prompt argument or template variable being completed.Additional already-resolved argument values supplied by the client for context.getRef()The completion target.getValue()The current (partial) value being completed.setArgumentName(String value) Sets the name of the prompt argument or template variable being completed.setContextArguments(Map<String, String> value) Sets the additional already-resolved argument values supplied by the client for context.setRef(McpCompletionRef value) Sets the completion target.Sets the current (partial) value being completed.
-
Constructor Details
-
McpCompletionRequest
public McpCompletionRequest()
-
-
Method Details
-
getRef
The completion target.- Returns:
- The reference, or
null if not set.
-
setRef
Sets the completion target.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getArgumentName
The name of the prompt argument or template variable being completed.- Returns:
- The argument name, or
null if not set.
-
setArgumentName
Sets the name of the prompt argument or template variable being completed.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object.
-
getValue
The current (partial) value being completed.Adapters must validate this as a non-
null string before dispatching to a completer; this type does not itself enforce that constraint.- Returns:
- The current value. Never
null once an adapter has validated the request.
-
setValue
Sets the current (partial) value being completed.- Parameters:
value- The new value.- Returns:
- This object.
-
getContextArguments
Additional already-resolved argument values supplied by the client for context.- Returns:
- An immutable, insertion-ordered map. Never
null ; empty when the request omitted context.
-
setContextArguments
Sets the additional already-resolved argument values supplied by the client for context.The supplied map is defensively copied into an immutable, insertion-ordered map. A
null value normalizes to an immutable empty map, matching the contract for omitted context.- Parameters:
value- The new value. Can benull , which normalizes to an empty map.- Returns:
- This object.
-