executeRaw

open suspend fun executeRaw(argsJson: String, json: Json = Json { ignoreUnknownKeys = true }): String

Executes the tool from raw JSON arguments.

This is the entry point used by ToolCapable.executeTool. It deserializes rawJsonArgs into ARGS, calls execute, and returns the result as a string.

Return

The execution result as a string.

Parameters

rawJsonArgs

JSON-serialized arguments string.

json

The Json instance to use for deserialization. Defaults to one with ignoreUnknownKeys = true.

Throws

kotlinx.serialization.SerializationException

if the JSON is invalid.

if the tool execution fails.