diff --git a/ci.global.json b/ci.global.json index 14b50cf1..e04f218f 100644 --- a/ci.global.json +++ b/ci.global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "10.0.302" + "version": "10.0.401" } } diff --git a/src/SeqCli/SeqCli.csproj b/src/SeqCli/SeqCli.csproj index 346d0ed8..84e85cbd 100644 --- a/src/SeqCli/SeqCli.csproj +++ b/src/SeqCli/SeqCli.csproj @@ -27,7 +27,7 @@ - + @@ -35,14 +35,14 @@ - + - - + + - + diff --git a/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs b/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs index 80d2459f..af49598e 100644 --- a/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs +++ b/test/SeqCli.EndToEnd/Mcp/McpToolTestCase.cs @@ -47,9 +47,14 @@ protected static T AssertStructuredResult(CallToolResult callToolResult) AssertTextResult(callToolResult); Assert.NotNull(callToolResult.StructuredContent); - // Tools returning non-object values have them wrapped in a `result` property by the MCP - // SDK, because the protocol requires `structuredContent` to be an object. - var result = callToolResult.StructuredContent.Value.GetProperty("result"); + // Before protocol version 2026-07-28, `structuredContent` had to be an object, so the MCP SDK + // wrapped non-object values (e.g. arrays) in a `result` property. From that version on, the SDK + // sends the value directly. Accept either shape. + var structuredContent = callToolResult.StructuredContent.Value; + var result = structuredContent.ValueKind == JsonValueKind.Object && + structuredContent.TryGetProperty("result", out var wrapped) + ? wrapped + : structuredContent; return result.Deserialize(JsonSerializerOptions.Web)!; } diff --git a/test/SeqCli.Tests/SeqCli.Tests.csproj b/test/SeqCli.Tests/SeqCli.Tests.csproj index 4a7ca500..d6d36b69 100644 --- a/test/SeqCli.Tests/SeqCli.Tests.csproj +++ b/test/SeqCli.Tests/SeqCli.Tests.csproj @@ -4,9 +4,9 @@ true - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -14,7 +14,7 @@ - +