McpRemoteTool

class McpRemoteTool : KoryTool<JsonObject, String>

Properties

Link copied to clipboard
open override val argsSerializer: KSerializer<JsonObject>

The kotlinx.serialization KSerializer for the ARGS type. Used to generate the JSON schema for the tool's parameters.

Link copied to clipboard
Link copied to clipboard
open override val description: String?

A human-readable description of what the tool does.

Link copied to clipboard
open override val name: String

The tool's name (used by the model to reference it).

Link copied to clipboard
open override val resultSerializer: KSerializer<String>

The kotlinx.serialization KSerializer for the R type. Used to generate the JSON schema for the tool's results.

Functions

Link copied to clipboard
Link copied to clipboard
open suspend override fun execute(args: JsonObject): String

Relays the call to the MCP server (tools/call).

Link copied to clipboard
open suspend override fun executeRaw(argsJson: String, json: Json = Json { ignoreUnknownKeys = true }): String

The MCP result is already text - no re-serialization (the default implementation would JSON-quote it).

Link copied to clipboard
open override fun toString(): String