toOpenAIToolSpec

Generates an OpenAI tool definition JSON from a core KoryTool.

The returned JSON has the structure:

{
"type": "function",
"function": {
"name": "...",
"description": "...",
"parameters": { ... }
}
}

The parameters field is a JSON Schema generated from the tool's argsSerializer.

Return

A JsonObject representing the OpenAI tool definition.