progress

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package progress provides utilities for reporting progress in MCP tool handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressReporter

type ProgressReporter struct {
	// contains filtered or unexported fields
}

ProgressReporter helps report progress in tool handlers.

func NewProgressReporter

func NewProgressReporter(ctx context.Context, token *protocol.ProgressToken, server *server.Server, session server.ClientSession) *ProgressReporter

NewProgressReporter creates a new progress reporter.

func (*ProgressReporter) Report

func (p *ProgressReporter) Report(message string) error

Report sends a progress update with the given message.

func (*ProgressReporter) ReportProgress

func (p *ProgressReporter) ReportProgress(message string, percentage int) error

ReportProgress sends a progress update with percentage.

func (*ProgressReporter) Reportf

func (p *ProgressReporter) Reportf(format string, args ...interface{}) error

Reportf sends a progress update with a formatted message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL