Skip to content

SetProgressToken silently fails when Meta is nil #845

@StevenRChen

Description

@StevenRChen

Describe the bug
SetProgressToken in mcp/shared.go silently fails when called on a Params struct with a nil Meta field. The progress token is written into a locally created map that is never assigned back to the struct, so it is immediately discarded.

To Reproduce
Minimum test case

p := &mcp.CallToolParams{Name: "n"}
p.SetProgressToken("t")
fmt.Println(p.GetProgressToken()) // nil

Expected behaviour
GetProgressToken() should return "t" after calling SetProgressToken("t"), regardless of whether Meta was previously set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions