@@ -11,53 +11,53 @@ import (
11
11
type MCPMethod string
12
12
13
13
const (
14
- // Initiates connection and negotiates protocol capabilities.
14
+ // MethodInitialize initiates connection and negotiates protocol capabilities.
15
15
// https://modelcontextprotocol.io/specification/2024-11-05/basic/lifecycle/#initialization
16
16
MethodInitialize MCPMethod = "initialize"
17
17
18
- // Verifies connection liveness between client and server.
18
+ // MethodPing verifies connection liveness between client and server.
19
19
// https://modelcontextprotocol.io/specification/2024-11-05/basic/utilities/ping/
20
20
MethodPing MCPMethod = "ping"
21
21
22
- // Lists all available server resources.
22
+ // MethodResourcesList lists all available server resources.
23
23
// https://modelcontextprotocol.io/specification/2024-11-05/server/resources/
24
24
MethodResourcesList MCPMethod = "resources/list"
25
25
26
- // Provides URI templates for constructing resource URIs.
26
+ // MethodResourcesTemplatesList provides URI templates for constructing resource URIs.
27
27
// https://modelcontextprotocol.io/specification/2024-11-05/server/resources/
28
28
MethodResourcesTemplatesList MCPMethod = "resources/templates/list"
29
29
30
- // Retrieves content of a specific resource by URI.
30
+ // MethodResourcesRead retrieves content of a specific resource by URI.
31
31
// https://modelcontextprotocol.io/specification/2024-11-05/server/resources/
32
32
MethodResourcesRead MCPMethod = "resources/read"
33
33
34
- // Lists all available prompt templates.
34
+ // MethodPromptsList lists all available prompt templates.
35
35
// https://modelcontextprotocol.io/specification/2024-11-05/server/prompts/
36
36
MethodPromptsList MCPMethod = "prompts/list"
37
37
38
- // Retrieves a specific prompt template with filled parameters.
38
+ // MethodPromptsGet retrieves a specific prompt template with filled parameters.
39
39
// https://modelcontextprotocol.io/specification/2024-11-05/server/prompts/
40
40
MethodPromptsGet MCPMethod = "prompts/get"
41
41
42
- // Lists all available executable tools.
42
+ // MethodToolsList lists all available executable tools.
43
43
// https://modelcontextprotocol.io/specification/2024-11-05/server/tools/
44
44
MethodToolsList MCPMethod = "tools/list"
45
45
46
- // Invokes a specific tool with provided parameters.
46
+ // MethodToolsCall invokes a specific tool with provided parameters.
47
47
// https://modelcontextprotocol.io/specification/2024-11-05/server/tools/
48
48
MethodToolsCall MCPMethod = "tools/call"
49
49
50
- // Notifies when the list of available resources changes.
50
+ // MethodNotificationResourcesListChanged notifies when the list of available resources changes.
51
51
// https://modelcontextprotocol.io/specification/2025-03-26/server/resources#list-changed-notification
52
52
MethodNotificationResourcesListChanged = "notifications/resources/list_changed"
53
53
54
54
MethodNotificationResourceUpdated = "notifications/resources/updated"
55
55
56
- // Notifies when the list of available prompt templates changes.
56
+ // MethodNotificationPromptsListChanged notifies when the list of available prompt templates changes.
57
57
// https://modelcontextprotocol.io/specification/2025-03-26/server/prompts#list-changed-notification
58
58
MethodNotificationPromptsListChanged = "notifications/prompts/list_changed"
59
59
60
- // Notifies when the list of available tools changes.
60
+ // MethodNotificationToolsListChanged notifies when the list of available tools changes.
61
61
// https://spec.modelcontextprotocol.io/specification/2024-11-05/server/tools/list_changed/
62
62
MethodNotificationToolsListChanged = "notifications/tools/list_changed"
63
63
)
@@ -132,7 +132,7 @@ type NotificationParams struct {
132
132
}
133
133
134
134
// MarshalJSON implements custom JSON marshaling
135
- func (p NotificationParams ) MarshalJSON () ([]byte , error ) {
135
+ func (p * NotificationParams ) MarshalJSON () ([]byte , error ) {
136
136
// Create a map to hold all fields
137
137
m := make (map [string ]interface {})
138
138
@@ -863,7 +863,6 @@ type RootsListChangedNotification struct {
863
863
Notification
864
864
}
865
865
866
- /* Client messages */
867
866
// ClientRequest represents any request that can be sent from client to server.
868
867
type ClientRequest interface {}
869
868
@@ -873,7 +872,6 @@ type ClientNotification interface{}
873
872
// ClientResult represents any result that can be sent from client to server.
874
873
type ClientResult interface {}
875
874
876
- /* Server messages */
877
875
// ServerRequest represents any request that can be sent from server to client.
878
876
type ServerRequest interface {}
879
877
0 commit comments