MCP ExplorerExplorer

Xemantic Ai Tool Schema Mdc

@xemanticon a year ago
2 Apache-2.0
FreeCommunity
AI Systems
#json-schema#kotlin#kotlin-library#schema#tool#agents#artificial-intelligence#agentic#agentic-ai#ai#anthropic#artificialintelligence#function-calling#kotlin-multiplatform#large-language-models#llm#mdc#model-context-protocol#tool-use
Adapting xemantic-ai-tool-schema to Model Context Protocol kotlin-sdk Tool input

Overview

What is Xemantic Ai Tool Schema Mdc

xemantic-ai-tool-schema-mdc is a tool designed to adapt the xemantic-ai-tool-schema for use with the Model Context Protocol kotlin-sdk, enabling seamless integration and functionality within Kotlin-based applications.

Use cases

Use cases for xemantic-ai-tool-schema-mdc include developing AI-driven applications, integrating AI tools into existing Kotlin projects, and creating structured data inputs for machine learning models.

How to use

To use xemantic-ai-tool-schema-mdc, developers can integrate it into their Kotlin projects by including the necessary dependencies from Maven Central and following the documentation provided in the repository for setup and usage instructions.

Key features

Key features of xemantic-ai-tool-schema-mdc include compatibility with Model Context Protocol, easy integration with Kotlin applications, and a structured schema for AI tool input, enhancing the development process.

Where to use

xemantic-ai-tool-schema-mdc can be used in various fields such as artificial intelligence, software development, and application integration, particularly where Kotlin is the primary programming language.

Content

xemantic-ai-tool-schema-mdc

Adapting xemantic-ai-tool-schema to Model Context Protocol kotlin-sdk Tool input.

Maven Central Version
GitHub Release Date
license

GitHub Actions Workflow Status
GitHub branch check runs
GitHub commits since latest release
GitHub last commit

GitHub contributors
GitHub commit activity
GitHub code size in bytes
GitHub Created At
kotlin version

discord server
discord users online
X (formerly Twitter) Follow

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers