xemantic-ai-tool-schema-mdc
Adapting xemantic-ai-tool-schema to Model Context Protocol kotlin-sdk Tool input
GitHubスター
2
ユーザー評価
未評価
お気に入り
0
閲覧数
3
フォーク
0
イシュー
32
xemantic-ai-tool-schema-mdc
Adapting xemantic-ai-tool-schema to Model Context Protocol kotlin-sdk Tool input.
Why?
The kotlin-sdk variant of the Model Context Protocol is expressing JSON Schema as Tool.Input
class, which offers limited flexibility comparing
to JsonSchema delivered by the xemantic-ai-tool-schema project.
In particular definitions
of types cannot be expressed.
I hope kotlin-sdk
will embrace something more versatile soon. Meanwhile, this adapter library can be used for automatic MDC-compatible JSON Schema generation out of serializable Kotlin classes.
Usage
Setting up Gradle
In your build.gradle.kts
:
dependencies {
implementation("com.xemantic.ai:xemantic-ai-tool-schema-mdc:0.1.1")
}
Getting Tool.Input
instance
@Serializable
data class Foo(
val bar: String
)
// ...
val inputSchema: Tool.Input = mdcToolInput<Foo>()
See ObjectSchemaToMdcToolInputTest for details.
Development
Clone this project, and then run:
./gradlew build
Koog is the official Kotlin framework for building and running robust, scalable and production-ready AI agents across all platforms – from backend services to Android, JVM, and even in-browser environments. Koog is based on our AI products expertise and provides proven solutions for complex LLM and AI problems