forked from modelcontextprotocol/go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
validate doc #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jba
wants to merge
23
commits into
main
Choose a base branch
from
validate-doc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
validate doc #3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add an UnmarshalJSON method for that type. Add a test.
Use a verb for this method name.
Some logically boolean fields default to true. We cannot use bool for these fields, because it defaults to false. So use *bool.
- Add some doc strings. - Remove markdown-like notations.
…ontextprotocol#49) Also, update a pkgsite link in the README.
Implement KeepAlive features from the design doc. Fixes modelcontextprotocol#24.
Fix an example using params.Name instead of params.Arguments.Name. All credit due to @A11Might for noticing this. Sending a separate PR to keep the internal/readme source consistent.
…tocol#68) This PR updates the comments for func changeAndNotify and ReadResource to correct typos and improve clarity.
This pull request addresses multiple minor documentation and code comment fixes to correct typos and improve clarity. These changes do not introduce functional modifications but enhance readability and professionalism. ### Documentation Fixes: * Corrected a typo in the "Security Considerations" section header in `design/design.md`. ("Securty" → "Security") * Fixed spelling errors in the "Governance and Community" section of `design/design.md`. ("accomodating" → "accommodating") * Updated the "Proposals" section in `design/design.md` to fix a typo. ("accomodate" → "accommodate") ### Code Comment Fixes: * Corrected a typo in a comment in `mcp/logging.go`. ("LoggingMesssage" → "LoggingMessage") * Fixed a typo in a comment in `mcp/streamable.go`. ("priviledged" → "privileged") <!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> This PR is for fixing some typos in the repo ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> by code diff ## Breaking Changes <!-- Will users need to update their code or configurations? --> N/A ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] 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 <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] 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 <!-- Add any other context, implementation notes, or design decisions -->
I added an example for how rate limiting should be implemented using middleware. Fixes modelcontextprotocol#22 ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> Rate limiting can be enabled using middleware. This adds an example on how to do that. ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> N/A ## Breaking Changes <!-- Will users need to update their code or configurations? --> No ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] 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) - [x] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions -->
- Use `any` for CallToolResult.StructuredContent. - Change the non-generic structs into aliases for the generic ones.
The default template is too elaborate. Add a simpler one.
There's no evidence that it's needed. Also, improve doc and error messages.
Support additional (extra) keywords beyond those specified in the `Schema` type. The current behavior is additional keywords are dropped. To follow up: - There are similar util functions in `mcp/util.go` which don't seem to be used. Maybe we should move it to `internal/util` instead of `jsonchema/util.go` package? - The method `[Un]MarshalJSON` is only on `pointer receiver`, is this intended? (that means it will only work if we [un]marshal pointer to the `Schema` instance) - The fix is using the [un]marshalStructWithMap from `mcp/util.go` and there are requirements for the function to work properly but these are not strictly checked e.g. need `json:"-"` tag for the Extra field. Fixes modelcontextprotocol#69.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
go fmt
has been ran (feat(ci): Add check to ensurego fmt
has been ran modelcontextprotocol/go-sdk#43)