docs: add feature and troubleshooting documentation#463
Merged
jba merged 4 commits intomodelcontextprotocol:mainfrom Sep 16, 2025
Merged
docs: add feature and troubleshooting documentation#463jba merged 4 commits intomodelcontextprotocol:mainfrom
jba merged 4 commits intomodelcontextprotocol:mainfrom
Conversation
793be74 to
3a76d85
Compare
Contributor
Author
|
There are a lot of lines in this CL, but many of them are duplicate. Things to review:
Thanks! P.S. I didn't get to everything, but the CL was already getting quite large, so we should review it. |
Add a framework for feature documentation, and start populating it with our SDK documentation. This framework is as follows: - internal/docs/**.src.md is the markdown source for the docs/ directory. - The x/example/internal/cmd/weave tool is used to compile these docs to the top-level docs, supporting both linked code samples and generated tables of contents. - The readme-check workflow is updated to check these docs as well. - The structure of these docs follows the MCP spec. - Wherever possible, example code is linked from actual Go documentation examples, so that it is testable. Some minor modifications to the weave tool were made to support this framework. Additionally, partially fill out this documentation with content on base protocol and client features, as well as troubleshooting help. Along the way, a bug was encountered that our LoggingTransport was not concurrency safe. This is fixed with a mutex. Fixes modelcontextprotocol#466 Fixes modelcontextprotocol#409 Updates modelcontextprotocol#442
jba
previously requested changes
Sep 16, 2025
| transport := &mcp.StreamableClientTransport{ | ||
| Endpoint: "http://localhost:8080/mcp", | ||
| } | ||
| client, err := mcp.Connect(context.Background(), transport, &mcp.ClientOptions{...}) |
| ```go | ||
| ctx, cancel := context.WithCancel(context.Background()) | ||
| go cs.CallTool(ctx, &CallToolParams{Name: "slow"}) | ||
| cancel() // cancel the tool call |
Contributor
There was a problem hiding this comment.
Doesn't make sense. Add more code or at least "...".
Contributor
Author
There was a problem hiding this comment.
I added a full example.
Contributor
|
This is awesome, BTW. |
jba
approved these changes
Sep 16, 2025
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
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.
Add a framework for feature documentation, and start populating it with
our SDK documentation.
This framework is as follows:
directory.
the top-level docs, supporting both linked code samples and generated
tables of contents.
examples, so that it is testable.
Some minor modifications to the weave tool were made to support this
framework.
Additionally, partially fill out this documentation with content on
base protocol and client features, as well as troubleshooting help.
Along the way, a bug was encountered that our LoggingTransport was not
concurrency safe. This is fixed with a mutex.
Fixes #466
Fixes #409
Updates #442