RequestMetaBuilder
DSL builder for constructing RequestMeta instances.
This builder creates metadata for MCP requests, supporting progress tokens and custom key-value pairs.
Example:
meta {
progressToken("progress-123")
put("requestId", "req-456")
put("priority", 1)
putJsonObject("context") {
put("source", "api")
}
}Content copied to clipboard
See also
Functions
Link copied to clipboard
Sets the progress token as an Int.
Sets the progress token as a Long.
Sets the progress token as a string.
Link copied to clipboard
Adds a custom metadata field with a Boolean value.
Adds a custom metadata field with a null value.
Adds a custom metadata field with a Number value.
Adds a custom metadata field with a String value.
Adds a custom metadata field with a JsonElement value.
Link copied to clipboard
Adds a custom metadata field with a JsonArray value using a DSL builder.
Link copied to clipboard
Adds a custom metadata field with a JsonObject value using a DSL builder.