Skip to content

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Aug 7, 2025

The standard says:

The progress and the total values MAY be floating point.

https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/progress#progress-flow

Motivation and Context

Aligns with the standard

How Has This Been Tested?

Ran with a FastMCP server that looks like

@mcp.tool()
async def count(ctx: Context, until: int) -> int:
    """Counts and streams results"""
    for i in range(1, until + 1):
        await ctx.report_progress(i, until)
        await asyncio.sleep(0.5)

    return until

Breaking Changes

Yes, this changes they type of a public field of a struct.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@jamadeo jamadeo requested a review from alexhancock August 7, 2025 16:30
@github-actions github-actions bot added the T-core Core library changes label Aug 7, 2025
@jamadeo jamadeo changed the title Fix numeric types in progress notifications fix: correct numeric types in progress notifications Aug 7, 2025
@github-actions github-actions bot added the T-test Testing related changes label Aug 7, 2025
The standard specifies that these may be floating-point.
@jamadeo jamadeo force-pushed the jamadeo/fix-numeric-types branch from d577bd8 to fe829bd Compare August 7, 2025 16:43
@github-actions github-actions bot added the T-config Configuration file changes label Aug 7, 2025
@jamadeo jamadeo merged commit 589815a into modelcontextprotocol:main Aug 7, 2025
11 checks passed
@github-actions github-actions bot mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-core Core library changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants