Skip to content

Commit 287173a

Browse files
committed
Meta and progress token redesign
1 parent 9547ccc commit 287173a

File tree

5 files changed

+191
-208
lines changed

5 files changed

+191
-208
lines changed

mcp/example_progress_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Example_progressMiddleware() {
2424
func addProgressToken[S mcp.Session](h mcp.MethodHandler[S]) mcp.MethodHandler[S] {
2525
return func(ctx context.Context, s S, method string, params mcp.Params) (result mcp.Result, err error) {
2626
if rp, ok := params.(mcp.RequestParams); ok {
27-
*rp.GetProgressToken() = nextProgressToken.Add(1)
27+
rp.SetProgressToken(nextProgressToken.Add(1))
2828
}
2929
return h(ctx, s, method, params)
3030
}

0 commit comments

Comments
 (0)