Skip to content

Conversation

@h9jiang
Copy link
Collaborator

@h9jiang h9jiang commented Aug 20, 2025

This change adopts a clearer convention:

  • any is used for fields where the structure is defined by the client or server implementer.
  • an named empty struct type is the place holder type to be defined by the MCP spec in the future.

The "Experimental" fields in "ClientCapabilities" and "ServerCapabilities" now use "map[string]any". This allows clients and servers to negotiate custom capabilities that contain complex data, rather than being restricted to a simple on/off flag.

The "Metadata" field in "CreateMessageParams" was also changed to "any" to properly serve its purpose as a flexible container for server-defined data.

This change adopts a clearer convention:
- any is used for fields where the structure is defined by
the client or server implementer.
- struct{} is reserved for placeholder fields to be defined
by the MCP spec in the future.

The "Experimental" fields in "ClientCapabilities" and
"ServerCapabilities" now use "map[string]any". This allows
clients and servers to negotiate custom capabilities that contain
complex data, rather than being restricted to a simple on/off flag.

The "Metadata" field in "CreateMessageParams" was also changed to
"any" to properly serve its purpose as a flexible container for
server-defined data.
@h9jiang
Copy link
Collaborator Author

h9jiang commented Aug 20, 2025

Some reference that might be helpful:

LSP Client Capability Experimental definition in typescript

	/**
	 * Experimental client capabilities.
	 */
	experimental?: LSPAny;

The go LSP client used a slice (array) for some feature.

	// Experimental client capabilities.
	Experimental any `json:"experimental,omitempty"`

LSP Client Capability Experimental definition in go

@h9jiang h9jiang requested review from findleyr and jba August 20, 2025 15:22
@h9jiang h9jiang linked an issue Aug 20, 2025 that may be closed by this pull request
@jba
Copy link
Contributor

jba commented Aug 20, 2025

You should remove the "PR Guideline" section from the commit message. (Can wait until you commit.)

@h9jiang
Copy link
Collaborator Author

h9jiang commented Aug 20, 2025

Just remove anything below the PR Guideline, does this look good to you?

@h9jiang h9jiang merged commit 3f10c19 into main Aug 20, 2025
8 checks passed
yasomaru pushed a commit to yasomaru/go-sdk that referenced this pull request Aug 28, 2025
…textprotocol#334)

This change adopts a clearer convention:
- any is used for fields where the structure is defined by the client or
server implementer.
- an named empty struct type is the place holder type to be defined by
the MCP spec in the future. 

The "Experimental" fields in "ClientCapabilities" and
"ServerCapabilities" now use "map[string]any". This allows clients and
servers to negotiate custom capabilities that contain complex data,
rather than being restricted to a simple on/off flag.

The "Metadata" field in "CreateMessageParams" was also changed to "any"
to properly serve its purpose as a flexible container for server-defined
data.
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.

Change type of CreateMessageParams.Metadata

3 participants