Add godoc to the exported hostedtool.MCPServer type - #684
Conversation
There was a problem hiding this comment.
Pull request overview
Adds GoDoc documentation for the exported hostedtool.MCPServer marker type to align it with other hosted tool marker types in tool/hostedtool and improve go doc output.
Changes:
- Adds a type-level doc comment for
hostedtool.MCPServer. - Adds field-level doc comments for most
MCPServerfields.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // MCPServer represents a hosted tool that can be specified to an AI service | ||
| // to enable it to invoke tools exposed by a remote MCP server. | ||
| type MCPServer struct { | ||
| AdditionalProperties map[string]any |
There was a problem hiding this comment.
Good catch — fixed in f9bacaa: added a doc comment to MCPServer.AdditionalProperties describing it as provider-specific properties not represented by the other fields.
c3a3f55 to
497c0ce
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
The MCPServer marker type was undocumented while its siblings WebSearch, FileSearch, and CodeInterpreter each carry a doc comment, so go doc rendered MCPServer with no description. Add a type comment in the siblings' voice plus short field comments.
f9bacaa to
84f9a53
Compare
Parity Review: No Issues FoundThis PR only adds doc comments to the exported Scope: Out of scope for cross-repo parity review (docs-only change). Label: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
What
Add a doc comment to the exported
hostedtool.MCPServertype, plus short comments on each of its fields.Why
MCPServeris the only marker type intool/hostedtoolwithout a doc comment. Its three siblings —WebSearch,FileSearch, andCodeInterpreter— each carry a type comment, sogo doc tool/hostedtool MCPServerpreviously rendered the type with no description. The new comment is written in the siblings' voice and mirrors how the .NET/Python SDKs describe the hosted MCP tool: a marker that lets an AI service invoke tools exposed by a remote MCP server. This restores consistent, complete godoc across the package.How tested
Docs-only change. Verified with:
go build ./...go vet ./tool/hostedtool/...go test ./tool/hostedtool/...go doc ./tool/hostedtool MCPServernow shows the new description sentence and field comments.