Add metadata support to callTool method (#289)
According to https://modelcontextprotocol.io/specification/2025-06-18/basic/index#meta, the _meta parameter should be passable when calling tools. While the CallToolRequest class (in types.kt) currently includes _meta in its definition, SDK users cannot actually input _meta when invoking the callTool method. This Pull Request adds a metadata parameter to the CallTool method and includes functionality to convert various data formats without loss. Additionally, to encourage the use of valid Key name formats as defined by the protocol, validation for prefixes has been implemented. --------- Co-authored-by: MAERYO <maeryo@hanwha.com> Co-authored-by: devcrocod <devcrocod@gmail.com>
This commit is contained in:
parent
2da14b0f2e
commit
407df7a3a4
1 changed files with 500 additions and 20 deletions
|
|
@ -484,7 +484,7 @@ abstract class AbstractToolIntegrationTest : KotlinTestBase() {
|
|||
"result" : 11.0,
|
||||
"formattedResult" : "11,000",
|
||||
"precision" : 3,
|
||||
"tags" : [ ]
|
||||
"tags" : ["test", "calculator", "integration"]
|
||||
}
|
||||
""".trimIndent()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue