Skip to content

Commit 7e47551

Browse files
Copilotstephentoub
andcommitted
Remove duplicate test helper method per code review feedback
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent 7893edc commit 7e47551

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

tests/ModelContextProtocol.Tests/Server/McpServerToolTests.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ public void OutputSchema_Attribute_WithType_GeneratesSchema()
659659
[Fact]
660660
public async Task OutputSchema_Attribute_CallToolResult_PreservesStructuredContent()
661661
{
662-
McpServerTool tool = McpServerTool.Create(ToolWithOutputSchemaReturningCallToolResult);
662+
McpServerTool tool = McpServerTool.Create(ToolWithOutputSchemaAttribute);
663663

664664
Assert.NotNull(tool.ProtocolTool.OutputSchema);
665665
Assert.Equal("object", tool.ProtocolTool.OutputSchema.Value.GetProperty("type").GetString());
@@ -791,17 +791,6 @@ private static CallToolResult ToolWithOutputSchemaAttribute()
791791
};
792792
}
793793

794-
[McpServerTool(UseStructuredContent = true, OutputSchema = typeof(Person))]
795-
private static CallToolResult ToolWithOutputSchemaReturningCallToolResult()
796-
{
797-
var person = new Person("John", 27);
798-
return new CallToolResult()
799-
{
800-
Content = [new TextContentBlock { Text = $"{person.Name}, {person.Age}" }],
801-
StructuredContent = JsonSerializer.SerializeToElement(person, McpJsonUtilities.DefaultOptions),
802-
};
803-
}
804-
805794
[McpServerTool(UseStructuredContent = false, OutputSchema = typeof(Person))]
806795
private static CallToolResult ToolWithOutputSchemaButNoStructuredContent()
807796
{

0 commit comments

Comments
 (0)