Skip to content

Add support for progress tracking #82

Open

Description

Activity

  1. stallent commented on Apr 24, 2025

    @stallent
    Contributor

    @mattt starting to look at that as we just stood up a server that supports this. The code itself won't be hard but was curious if you had any thoughts already on how you wanted to do the client api. If we were to try to be roughly similar to the official TS client approach, we would either pass a progress token to callTool and it would come back in the notes stream with that token which would put it on the dev to connect the two. Clearly the simplest to implement, but puts a bit more effort on the dev if they want progress info. Not necessarily a bad thing and keeps the current client api essentially the same. Or pass an optional progress closure to callTool, which is obviously a common TS approach, but could be a bit more awkward in Swift. We could also provide an overload to call tool and return an asyncstream for the progress. something like

    let (toolTask, progressStream) =  client.callTool(...)
    
    Task {
        for await progress in progressStream {
            print("Progress: \(progress * 100)%")
        }
    }
        
    let toolResult = try await toolTask.value

    I could make a case for any of the three approaches but its your call.

  2. alainakafkes commented on Oct 23, 2025

    @alainakafkes

    any updates on this feature? i like the first (client includes progress token when invoking callTool and separately subscribes to notifications for this progress token) and third (client receives both progress notifications and final output from callTool) ideas suggested by @stallent but would appreciate it if the maintainer(s) could weigh on on this design decision when they have time to do so 🙏

    (also @stallent feel free to let me know if i've misinterpreted your proposal! i updated this comment with rephrasings of your ideas to confirm my understanding)

  3. DePasqualeOrg commented on Jan 4, 2026

    @DePasqualeOrg

    I've implemented this functionality in my PR #175. I'd love to hear your feedback if you're able to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions