Skip to content

design: add design for completion#34

Merged
findleyr merged 1 commit into
modelcontextprotocol:mainfrom
samthanawalla:design
Jun 25, 2025
Merged

design: add design for completion#34
findleyr merged 1 commit into
modelcontextprotocol:mainfrom
samthanawalla:design

Conversation

@samthanawalla

@samthanawalla samthanawalla commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

This design introduces a server handler for completion.

updates #12

Motivation and Context

Completion design missing.

How Has This Been Tested?

N/A

Breaking Changes

N/A

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

N/A

This design introduces a server handler for completion.
@samthanawalla
samthanawalla marked this pull request as ready for review June 25, 2025 18:34
@findleyr
findleyr self-requested a review June 25, 2025 18:54
Comment thread design/design.md

- **Validate all completion inputs**: The CompleteRequest received by the handler may contain arbitrary data from the client. Before processing, thoroughly validate all fields.

- **Implement appropriate rate limiting**: Completion requests can be high-frequency, especially in interactive user experiences. Without rate limiting, a malicious client could potentially overload the server, leading to denial-of-service (DoS) attacks. Consider applying rate limits per client session, IP address, or API key, depending on your deployment model. This can be implemented within the CompletionHandler itself or via middleware (see [Middleware](#middleware)) that wraps the handler.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually do think we should make it easier for users, by providing rate limiting facilities. But we can discuss.

@findleyr findleyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@findleyr
findleyr merged commit 1478ba7 into modelcontextprotocol:main Jun 25, 2025
2 checks passed
samthanawalla added a commit to samthanawalla/go-sdk that referenced this pull request Jun 25, 2025
@jba jba mentioned this pull request Jul 1, 2025
@samthanawalla
samthanawalla deleted the design branch September 11, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants