Skip to content

Add godoc to the exported hostedtool.MCPServer type - #684

Merged
George Adams (gdams) merged 2 commits into
microsoft:mainfrom
PratikDhanaveFork:docgo-mcpserver-type
Jul 29, 2026
Merged

Add godoc to the exported hostedtool.MCPServer type#684
George Adams (gdams) merged 2 commits into
microsoft:mainfrom
PratikDhanaveFork:docgo-mcpserver-type

Conversation

@PratikDhanave

Copy link
Copy Markdown
Contributor

What

Add a doc comment to the exported hostedtool.MCPServer type, plus short comments on each of its fields.

Why

MCPServer is the only marker type in tool/hostedtool without a doc comment. Its three siblings — WebSearch, FileSearch, and CodeInterpreter — each carry a type comment, so go doc tool/hostedtool MCPServer previously 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 MCPServer now shows the new description sentence and field comments.

Copilot AI review requested due to automatic review settings July 24, 2026 01:29
@PratikDhanave
PratikDhanave (PratikDhanave) requested a review from a team as a code owner July 24, 2026 01:29

Copilot AI 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.

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 MCPServer fields.

💡 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — fixed in f9bacaa: added a doc comment to MCPServer.AdditionalProperties describing it as provider-specific properties not represented by the other fields.

@github-actions github-actions Bot added the parity-approved Go API consistency review found no parity issues label Jul 24, 2026
@github-actions

This comment has been minimized.

@github-actions

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.
@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: No Issues Found

This PR only adds doc comments to the exported hostedtool.MCPServer type and its fields — no exported API surface changed and no observable behavior changed.

Scope: Out of scope for cross-repo parity review (docs-only change).

Label: parity-approved correctly remains applied. No public-api-change label is needed since no exported identifiers were added, removed, or modified.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by Go API Consistency Review Agent · 21 AIC · ⌖ 5.5 AIC · ⊞ 5.9K ·

@gdams
George Adams (gdams) added this pull request to the merge queue Jul 29, 2026
Merged via the queue into microsoft:main with commit b2b442c Jul 29, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity-approved Go API consistency review found no parity issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants