Skip to content

Commit 33347bd

Browse files
authored
Merge pull request #8 from jpicklyk/feature/kotlin-sdk-0.7.2-integration
Feature/kotlin sdk 0.7.2 integration
2 parents 919f376 + 4780fd1 commit 33347bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1981
-27
lines changed

.idea/AndroidProjectSystem.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [1.1.0-alpha-01] - 2025-10-08
11+
12+
### Added
13+
- Output schemas for all 6 Task Management tools (create_task, get_task, update_task, delete_task, search_tasks, get_overview)
14+
- Output schemas for all 5 Project Management tools (create_project, get_project, update_project, delete_project, search_projects)
15+
- Output schemas for all 10 Section Management tools (add_section, get_sections, update_section, delete_section, update_section_text, update_section_metadata, bulk_create_sections, bulk_update_sections, bulk_delete_sections, reorder_sections)
16+
- Output schemas for all 9 Template Management tools (create_template, get_template, list_templates, apply_template, update_template_metadata, delete_template, add_template_section, enable_template, disable_template)
17+
- Tool titles for all 39 MCP tools for better discoverability in clients
18+
- ToolDefinition interface enhancements: optional `title` and `outputSchema` properties
19+
- ToolRegistry now registers tool titles and output schemas with MCP server
20+
21+
### Changed
22+
- All tool implementations now include descriptive title properties
23+
- All MCP tools now provide structured output schemas for better agent integration (Task, Project, Section, Template, Feature, and Dependency management)
24+
25+
### Technical Details
26+
- Output schemas use Tool.Output from kotlin-sdk 0.7.x
27+
- Schemas define complete response structure with required vs optional fields
28+
- Proper JSON Schema types, formats, and enum constraints
29+
- Support for nested structures (pagination, hierarchical data)
30+
- All changes maintain backward compatibility
31+
32+
## [1.0.2] - 2025-10-08
33+
34+
### Changed
35+
- Upgraded kotlin-sdk from 0.5.0 to 0.7.2
36+
- Updated Kotlin from 2.1.20 to 2.2.0 for SDK compatibility
37+
- Fixed test mock for addTool API signature change (now uses named parameters)
38+
39+
### Dependencies
40+
- kotlin-sdk: 0.5.0 → 0.7.2
41+
- Kotlin: 2.1.20 → 2.2.0
42+
- Ktor: 3.3.0 (transitive dependency from kotlin-sdk)
43+
44+
### Notes
45+
- SDK "breaking changes" (Kotlin-style callbacks, JSON serialization refactoring) did not affect codebase
46+
- All existing callbacks were already using proper Kotlin lambda syntax
47+
- JSON serialization patterns were already compatible with SDK 0.7.x changes
48+
- All tests pass successfully
49+
- Docker build validated and working
50+
- Build configuration validated with no deprecation warnings
51+
52+
### Technical Details
53+
For detailed information about the upgrade process and validation:
54+
- See feature: Kotlin SDK 0.7.2 Integration (feature-branch: feature/kotlin-sdk-0.7.2-integration)
55+
- All validation tasks completed successfully
56+
- No runtime issues detected

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ plugins {
66

77
// Define semantic version components (manually maintained)
88
val majorVersion = "1"
9-
val minorVersion = "0"
10-
val patchVersion = "2"
9+
val minorVersion = "1"
10+
val patchVersion = "0"
1111

1212
// Define release qualifier (empty for stable releases)
1313
// Examples: "", "alpha-01", "beta-02", "rc-01"
14-
val qualifier = ""
14+
val qualifier = "alpha-01"
1515

1616

1717
// Calculate build number from Git

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
22
# Kotlin and Coroutines
3-
kotlin = "2.1.20"
3+
kotlin = "2.2.0"
44
kotlinCoroutines = "1.8.0"
55
kotlinSerialization = "1.8.0"
66

77
# MCP SDK
8-
mcpSdk = "0.5.0"
8+
mcpSdk = "0.7.2"
99

1010
# Database
1111
sqlite = "3.45.1.0"

src/main/kotlin/io/github/jpicklyk/mcptask/application/tools/GetOverviewTool.kt

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import io.github.jpicklyk.mcptask.domain.model.Task
66
import io.github.jpicklyk.mcptask.domain.repository.Result
77
import io.github.jpicklyk.mcptask.infrastructure.util.ErrorCodes
88
import io.modelcontextprotocol.kotlin.sdk.Tool
9+
import kotlinx.serialization.json.JsonArray
910
import kotlinx.serialization.json.JsonElement
1011
import kotlinx.serialization.json.JsonObject
1112
import kotlinx.serialization.json.JsonPrimitive
@@ -25,6 +26,105 @@ class GetOverviewTool : BaseToolDefinition() {
2526

2627
override val name: String = "get_overview"
2728

29+
override val title: String = "Get Project Overview"
30+
31+
override val outputSchema: Tool.Output = Tool.Output(
32+
properties = JsonObject(
33+
mapOf(
34+
"success" to JsonObject(mapOf("type" to JsonPrimitive("boolean"))),
35+
"message" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
36+
"data" to JsonObject(
37+
mapOf(
38+
"type" to JsonPrimitive("object"),
39+
"description" to JsonPrimitive("Hierarchical project overview with features and tasks"),
40+
"properties" to JsonObject(
41+
mapOf(
42+
"features" to JsonObject(
43+
mapOf(
44+
"type" to JsonPrimitive("array"),
45+
"description" to JsonPrimitive("Array of features with their associated tasks"),
46+
"items" to JsonObject(
47+
mapOf(
48+
"type" to JsonPrimitive("object"),
49+
"properties" to JsonObject(
50+
mapOf(
51+
"id" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
52+
"name" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
53+
"status" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
54+
"summary" to JsonObject(mapOf("type" to JsonPrimitive("string"), "description" to JsonPrimitive("Truncated summary (optional based on summaryLength parameter)"))),
55+
"tasks" to JsonObject(
56+
mapOf(
57+
"type" to JsonPrimitive("array"),
58+
"items" to JsonObject(
59+
mapOf(
60+
"type" to JsonPrimitive("object"),
61+
"properties" to JsonObject(
62+
mapOf(
63+
"id" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
64+
"title" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
65+
"status" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
66+
"priority" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
67+
"complexity" to JsonObject(mapOf("type" to JsonPrimitive("integer"))),
68+
"summary" to JsonObject(mapOf("type" to JsonPrimitive("string"), "description" to JsonPrimitive("Truncated summary (optional based on summaryLength parameter)"))),
69+
"tags" to JsonObject(mapOf("type" to JsonPrimitive("string"), "description" to JsonPrimitive("Comma-separated tag string")))
70+
)
71+
)
72+
)
73+
)
74+
)
75+
)
76+
)
77+
)
78+
)
79+
)
80+
)
81+
),
82+
"orphanedTasks" to JsonObject(
83+
mapOf(
84+
"type" to JsonPrimitive("array"),
85+
"description" to JsonPrimitive("Array of tasks not associated with any feature"),
86+
"items" to JsonObject(
87+
mapOf(
88+
"type" to JsonPrimitive("object"),
89+
"properties" to JsonObject(
90+
mapOf(
91+
"id" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
92+
"title" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
93+
"status" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
94+
"priority" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
95+
"complexity" to JsonObject(mapOf("type" to JsonPrimitive("integer"))),
96+
"summary" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
97+
"tags" to JsonObject(mapOf("type" to JsonPrimitive("string")))
98+
)
99+
)
100+
)
101+
)
102+
)
103+
),
104+
"counts" to JsonObject(
105+
mapOf(
106+
"type" to JsonPrimitive("object"),
107+
"description" to JsonPrimitive("Summary counts for quick reference"),
108+
"properties" to JsonObject(
109+
mapOf(
110+
"features" to JsonObject(mapOf("type" to JsonPrimitive("integer"))),
111+
"tasks" to JsonObject(mapOf("type" to JsonPrimitive("integer"))),
112+
"orphanedTasks" to JsonObject(mapOf("type" to JsonPrimitive("integer")))
113+
)
114+
),
115+
"required" to JsonArray(listOf("features", "tasks", "orphanedTasks").map { JsonPrimitive(it) })
116+
)
117+
)
118+
)
119+
),
120+
"required" to JsonArray(listOf("features", "orphanedTasks", "counts").map { JsonPrimitive(it) })
121+
)
122+
)
123+
)
124+
),
125+
required = listOf("success", "message")
126+
)
127+
28128
override val description: String = """Retrieves a lightweight, token-efficient overview of tasks and features.
29129
30130
## Purpose

src/main/kotlin/io/github/jpicklyk/mcptask/application/tools/ToolDefinition.kt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,24 @@ interface ToolDefinition {
1818
*/
1919
val description: String
2020

21+
/**
22+
* Optional human-readable title for the tool (used for better organization and discoverability).
23+
* If not specified, defaults to null.
24+
*/
25+
val title: String? get() = null
26+
2127
/**
2228
* The parameter schema defining the expected input for this tool.
2329
*/
2430
val parameterSchema: Tool.Input
2531

32+
/**
33+
* Optional output schema defining the structure of the tool's response.
34+
* Enables better integration with agent workflow systems (n8n, Zapier, etc.).
35+
* If not specified, defaults to null.
36+
*/
37+
val outputSchema: Tool.Output? get() = null
38+
2639
/**
2740
* Categorization for organizing tools in documentation and UI.
2841
*/

src/main/kotlin/io/github/jpicklyk/mcptask/application/tools/ToolRegistry.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ class ToolRegistry(
9898
server.addTool(
9999
name = name,
100100
description = definition.description,
101-
inputSchema = definition.parameterSchema
101+
inputSchema = definition.parameterSchema,
102+
title = definition.title,
103+
outputSchema = definition.outputSchema
102104
) { request ->
103105
try {
104106
// Validate parameters

src/main/kotlin/io/github/jpicklyk/mcptask/application/tools/dependency/CreateDependencyTool.kt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,40 @@ class CreateDependencyTool : BaseToolDefinition() {
2525

2626
override val name: String = "create_dependency"
2727

28+
override val title: String = "Create Task Dependency"
29+
30+
override val outputSchema: Tool.Output = Tool.Output(
31+
properties = JsonObject(
32+
mapOf(
33+
"success" to JsonObject(mapOf("type" to JsonPrimitive("boolean"))),
34+
"message" to JsonObject(mapOf("type" to JsonPrimitive("string"))),
35+
"data" to JsonObject(
36+
mapOf(
37+
"type" to JsonPrimitive("object"),
38+
"description" to JsonPrimitive("The created dependency object"),
39+
"properties" to JsonObject(
40+
mapOf(
41+
"id" to JsonObject(mapOf("type" to JsonPrimitive("string"), "format" to JsonPrimitive("uuid"), "description" to JsonPrimitive("Unique identifier for the dependency"))),
42+
"fromTaskId" to JsonObject(mapOf("type" to JsonPrimitive("string"), "format" to JsonPrimitive("uuid"), "description" to JsonPrimitive("ID of the source task"))),
43+
"toTaskId" to JsonObject(mapOf("type" to JsonPrimitive("string"), "format" to JsonPrimitive("uuid"), "description" to JsonPrimitive("ID of the target task"))),
44+
"type" to JsonObject(
45+
mapOf(
46+
"type" to JsonPrimitive("string"),
47+
"enum" to JsonArray(listOf("BLOCKS", "IS_BLOCKED_BY", "RELATES_TO").map { JsonPrimitive(it) }),
48+
"description" to JsonPrimitive("Type of dependency relationship")
49+
)
50+
),
51+
"createdAt" to JsonObject(mapOf("type" to JsonPrimitive("string"), "format" to JsonPrimitive("date-time"), "description" to JsonPrimitive("ISO-8601 timestamp when dependency was created")))
52+
)
53+
)
54+
)
55+
),
56+
"error" to JsonObject(mapOf("type" to JsonArray(listOf(JsonPrimitive("object"), JsonPrimitive("null"))))),
57+
"metadata" to JsonObject(mapOf("type" to JsonPrimitive("object")))
58+
)
59+
)
60+
)
61+
2862
override val description: String = """Creates a new task dependency with validation for task existence, cycle detection, and duplicate prevention.
2963
3064
Dependencies represent relationships between tasks that can affect execution planning and workflow management.

0 commit comments

Comments
 (0)