Update content according to latest spec (#513)
* Update content according to latest spec * Add Title to a bunch of types * Add _meta to lots of types * Address feedback, more cleanup, fix NAOT test failure
This commit is contained in:
parent
28d65470f4
commit
2bcff315f8
1 changed files with 1700 additions and 853 deletions
|
|
@ -77,9 +77,9 @@ public class StreamableHttpClientConformanceTests(ITestOutputHelper outputHelper
|
|||
return Results.Json(new JsonRpcResponse
|
||||
{
|
||||
Id = request.Id,
|
||||
Result = JsonSerializer.SerializeToNode(new CallToolResponse()
|
||||
Result = JsonSerializer.SerializeToNode(new CallToolResult()
|
||||
{
|
||||
Content = [new() { Text = parameters.Arguments["message"].ToString() }],
|
||||
Content = [new TextContentBlock { Text = parameters.Arguments["message"].ToString() }],
|
||||
}, McpJsonUtilities.DefaultOptions),
|
||||
});
|
||||
}
|
||||
|
|
@ -141,8 +141,7 @@ public class StreamableHttpClientConformanceTests(ITestOutputHelper outputHelper
|
|||
var response = await echoTool.CallAsync(new Dictionary<string, object?>() { ["message"] = "Hello world!" }, cancellationToken: TestContext.Current.CancellationToken);
|
||||
Assert.NotNull(response);
|
||||
var content = Assert.Single(response.Content);
|
||||
Assert.Equal("text", content.Type);
|
||||
Assert.Equal("Hello world!", content.Text);
|
||||
Assert.Equal("Hello world!", Assert.IsType<TextContentBlock>(content).Text);
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync()
|
||||
|
|
|
|||
Loading…
Reference in a new issue