File tree Expand file tree Collapse file tree
main/java/org/springaicommunity/mcp/provider/tool Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import java .lang .reflect .Method ;
44import java .util .List ;
55
6+ import io .modelcontextprotocol .json .McpJsonDefaults ;
67import io .modelcontextprotocol .json .McpJsonMapper ;
78import io .modelcontextprotocol .util .Assert ;
89import org .springaicommunity .mcp .annotation .McpTool ;
@@ -11,7 +12,7 @@ public abstract class AbstractMcpToolProvider {
1112
1213 protected final List <Object > toolObjects ;
1314
14- protected McpJsonMapper jsonMapper = McpJsonMapper . createDefault ();
15+ protected McpJsonMapper jsonMapper = McpJsonDefaults . getMapper ();
1516
1617 public AbstractMcpToolProvider (List <Object > toolObjects ) {
1718 Assert .notNull (toolObjects , "toolObjects cannot be null" );
Original file line number Diff line number Diff line change 1313
1414import org .junit .jupiter .api .Test ;
1515import org .springaicommunity .mcp .annotation .McpToolListChanged ;
16- import io .modelcontextprotocol .json .McpJsonMapper ;
16+ import io .modelcontextprotocol .json .McpJsonDefaults ;
1717import io .modelcontextprotocol .spec .McpSchema ;
1818import reactor .core .publisher .Mono ;
1919import reactor .test .StepVerifier ;
@@ -29,12 +29,12 @@ public class AsyncMcpToolListChangedMethodCallbackTests {
2929 McpSchema .Tool .builder ()
3030 .name ("test-tool-1" )
3131 .description ("Test Tool 1" )
32- .inputSchema (McpJsonMapper . createDefault (), "{}" )
32+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3333 .build (),
3434 McpSchema .Tool .builder ()
3535 .name ("test-tool-2" )
3636 .description ("Test Tool 2" )
37- .inputSchema (McpJsonMapper . createDefault (), "{}" )
37+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3838 .build ());
3939
4040 /**
Original file line number Diff line number Diff line change 1313
1414import org .junit .jupiter .api .Test ;
1515import org .springaicommunity .mcp .annotation .McpToolListChanged ;
16- import io .modelcontextprotocol .json .McpJsonMapper ;
16+ import io .modelcontextprotocol .json .McpJsonDefaults ;
1717import io .modelcontextprotocol .spec .McpSchema ;
1818
1919/**
@@ -27,12 +27,12 @@ public class SyncMcpToolListChangedMethodCallbackTests {
2727 McpSchema .Tool .builder ()
2828 .name ("test-tool-1" )
2929 .description ("Test Tool 1" )
30- .inputSchema (McpJsonMapper . createDefault (), "{}" )
30+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3131 .build (),
3232 McpSchema .Tool .builder ()
3333 .name ("test-tool-2" )
3434 .description ("Test Tool 2" )
35- .inputSchema (McpJsonMapper . createDefault (), "{}" )
35+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3636 .build ());
3737
3838 /**
Original file line number Diff line number Diff line change 1313import org .junit .jupiter .api .Test ;
1414import org .springaicommunity .mcp .annotation .McpToolListChanged ;
1515import org .springaicommunity .mcp .method .changed .tool .AsyncToolListChangedSpecification ;
16- import io .modelcontextprotocol .json .McpJsonMapper ;
16+ import io .modelcontextprotocol .json .McpJsonDefaults ;
1717import io .modelcontextprotocol .spec .McpSchema ;
1818import reactor .core .publisher .Mono ;
1919import reactor .test .StepVerifier ;
@@ -29,12 +29,12 @@ public class AsyncMcpToolListChangedProviderTests {
2929 McpSchema .Tool .builder ()
3030 .name ("test-tool-1" )
3131 .description ("Test Tool 1" )
32- .inputSchema (McpJsonMapper . createDefault (), "{}" )
32+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3333 .build (),
3434 McpSchema .Tool .builder ()
3535 .name ("test-tool-2" )
3636 .description ("Test Tool 2" )
37- .inputSchema (McpJsonMapper . createDefault (), "{}" )
37+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3838 .build ());
3939
4040 /**
Original file line number Diff line number Diff line change 1313import org .junit .jupiter .api .Test ;
1414import org .springaicommunity .mcp .annotation .McpToolListChanged ;
1515import org .springaicommunity .mcp .method .changed .tool .SyncToolListChangedSpecification ;
16- import io .modelcontextprotocol .json .McpJsonMapper ;
16+ import io .modelcontextprotocol .json .McpJsonDefaults ;
1717import io .modelcontextprotocol .spec .McpSchema ;
1818
1919/**
@@ -27,12 +27,12 @@ public class SyncMcpToolListChangedProviderTests {
2727 McpSchema .Tool .builder ()
2828 .name ("test-tool-1" )
2929 .description ("Test Tool 1" )
30- .inputSchema (McpJsonMapper . createDefault (), "{}" )
30+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3131 .build (),
3232 McpSchema .Tool .builder ()
3333 .name ("test-tool-2" )
3434 .description ("Test Tool 2" )
35- .inputSchema (McpJsonMapper . createDefault (), "{}" )
35+ .inputSchema (McpJsonDefaults . getMapper (), "{}" )
3636 .build ());
3737
3838 /**
Original file line number Diff line number Diff line change 5656 <maven .compiler.source>17</maven .compiler.source>
5757 <maven .compiler.target>17</maven .compiler.target>
5858
59- <mcp .java.sdk.version>0.17.0 </mcp .java.sdk.version>
59+ <mcp .java.sdk.version>0.18.0-SNAPSHOT </mcp .java.sdk.version>
6060
6161 <jsonschema .version>4.38.0</jsonschema .version>
6262 <swagger-annotations .version>2.2.36</swagger-annotations .version>
354354 <enabled >true</enabled >
355355 </releases >
356356 </repository >
357- <!-- < repository>
357+ <repository >
358358 <id >spring-snapshots</id >
359359 <name >Spring Snapshots</name >
360360 <url >https://repo.spring.io/snapshot</url >
372372 <snapshots >
373373 <enabled >true</enabled >
374374 </snapshots >
375- </repository> -->
375+ </repository >
376376 </repositories >
377377
378378</project >
You can’t perform that action at this time.
0 commit comments