add ios and wasm targets (#81)

* add wasm and ios targets

* add yarn.lock file to gitignore

* clean up code

* fix typo in method name

* add wasm server example

* update jrelease publishing for klibs

* update gradle-publish workflow to use macos runner

* update README to reflect multiplatform support and clarify server setup for JVM and WASM

* remove the old main file from the kotlin-mcp-server example

* update api dump

* Refactor `build.gradle.kts`

* clean up imports and remove unnecessary charset specification in tests

* add JS target configuration and update API dump
This commit is contained in:
Pavel Gorgulov 2025-05-29 07:01:50 +02:00 • committed by GitHub
commit 0cff2ca718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,12 +67,9 @@ fun `run mcp server`() {
required = listOf("state")
)
) { request ->
val state = request.arguments["state"]?.jsonPrimitive?.content
if (state == null) {
return@addTool CallToolResult(
content = listOf(TextContent("The 'state' parameter is required."))
)
}
val state = request.arguments["state"]?.jsonPrimitive?.content ?: return@addTool CallToolResult(
content = listOf(TextContent("The 'state' parameter is required."))
)
val alerts = httpClient.getAlerts(state)