buildCallToolRequest

Creates a CallToolRequest using a type-safe DSL builder.

Required

  • name - The name of the tool to call

Optional

  • arguments - Arguments to pass to the tool

  • meta - Metadata for the request

Example without arguments:

val request = buildCallToolRequest {
name = "getCurrentTime"
}

Example with arguments:

val request = buildCallToolRequest {
name = "searchDatabase"
arguments {
put("query", "users")
put("limit", 10)
}
}

Return

A configured CallToolRequest instance

Parameters

block

Configuration lambda for setting up the call tool request

See also