Skip to content

Commit f1a786a

Browse files
committed
address review comments
1 parent 742c6dc commit f1a786a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mcp/streamable_bench_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import (
1515
)
1616

1717
func BenchmarkStreamableServing(b *testing.B) {
18+
// This benchmark measures how fast we can handle a single tool on a
19+
// streamable server, including tool validation and stream management.
1820
customSchemas := map[any]*jsonschema.Schema{
1921
Probability(0): {Type: "number", Minimum: jsonschema.Ptr(0.0), Maximum: jsonschema.Ptr(1.0)},
2022
WeatherType(""): {Type: "string", Enum: []any{Sunny, PartlyCloudy, Cloudy, Rainy, Snowy}},

mcp/tool_example_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ func ExampleAddTool_complexSchema() {
189189
if err != nil {
190190
log.Fatal(err)
191191
}
192+
// Formatting the entire schemas would be too much output.
193+
// Just check that our customizations were effective.
192194
fmt.Println("max days:", *t.InputSchema.Properties["days"].Maximum)
193195
fmt.Println("max confidence:", *t.OutputSchema.Properties["confidence"].Maximum)
194196
fmt.Println("weather types:", t.OutputSchema.Properties["dailyForecast"].Items.Properties["type"].Enum)

0 commit comments

Comments
 (0)