Skip to content

Commit 96f1b3b

Browse files
committed
[style] change naming style of structs
1 parent e581ab8 commit 96f1b3b

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

mcp/tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ type CallToolResult struct {
4545
// CallToolRequest is used by the client to invoke a tool provided by the server.
4646
type CallToolRequest struct {
4747
Request
48-
Params CallToolRequestParams `json:"params"`
48+
Params CallToolParams `json:"params"`
4949
}
5050

51-
type CallToolRequestParams struct {
51+
type CallToolParams struct {
5252
Name string `json:"name"`
5353
Arguments any `json:"arguments,omitempty"`
5454
Meta *Meta `json:"_meta,omitempty"`

mcp/types.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,10 @@ type CancelledNotificationParams struct {
392392
// connects, asking it to begin initialization.
393393
type InitializeRequest struct {
394394
Request
395-
Params InitializeRequestParams `json:"params"`
395+
Params InitializeParams `json:"params"`
396396
}
397397

398-
type InitializeRequestParams struct {
398+
type InitializeParams struct {
399399
// The latest version of the Model Context Protocol that the client supports.
400400
// The client MAY decide to support older versions as well.
401401
ProtocolVersion string `json:"protocolVersion"`
@@ -512,10 +512,10 @@ type ProgressNotificationParams struct {
512512

513513
type PaginatedRequest struct {
514514
Request
515-
Params PaginatedRequestParams `json:"params,omitempty"`
515+
Params PaginatedParams `json:"params,omitempty"`
516516
}
517517

518-
type PaginatedRequestParams struct {
518+
type PaginatedParams struct {
519519
// An opaque token representing the current pagination position.
520520
// If provided, the server should return results starting after this cursor.
521521
Cursor Cursor `json:"cursor,omitempty"`
@@ -561,10 +561,10 @@ type ListResourceTemplatesResult struct {
561561
// specific resource URI.
562562
type ReadResourceRequest struct {
563563
Request
564-
Params ReadResourceRequestParams `json:"params"`
564+
Params ReadResourceParams `json:"params"`
565565
}
566566

567-
type ReadResourceRequestParams struct {
567+
type ReadResourceParams struct {
568568
// The URI of the resource to read. The URI can use any protocol; it is up
569569
// to the server how to interpret it.
570570
URI string `json:"uri"`
@@ -591,10 +591,10 @@ type ResourceListChangedNotification struct {
591591
// notifications from the server whenever a particular resource changes.
592592
type SubscribeRequest struct {
593593
Request
594-
Params SubscribeRequestParams `json:"params"`
594+
Params SubscribeParams `json:"params"`
595595
}
596596

597-
type SubscribeRequestParams struct {
597+
type SubscribeParams struct {
598598
// The URI of the resource to subscribe to. The URI can use any protocol; it
599599
// is up to the server how to interpret it.
600600
URI string `json:"uri"`
@@ -605,10 +605,10 @@ type SubscribeRequestParams struct {
605605
// resources/subscribe request.
606606
type UnsubscribeRequest struct {
607607
Request
608-
Params UnsubscribeRequestParams `json:"params"`
608+
Params UnsubscribeParams `json:"params"`
609609
}
610610

611-
type UnsubscribeRequestParams struct {
611+
type UnsubscribeParams struct {
612612
// The URI of the resource to unsubscribe from.
613613
URI string `json:"uri"`
614614
}
@@ -710,10 +710,10 @@ func (BlobResourceContents) isResourceContents() {}
710710
// adjust logging.
711711
type SetLevelRequest struct {
712712
Request
713-
Params SetLevelRequestParams `json:"params"`
713+
Params SetLevelParams `json:"params"`
714714
}
715715

716-
type SetLevelRequestParams struct {
716+
type SetLevelParams struct {
717717
// The level of logging that the client wants to receive from the server.
718718
// The server should send all logs at this level and higher (i.e., more severe) to
719719
// the client as notifications/logging/message.
@@ -763,10 +763,10 @@ const (
763763
// the request (human in the loop) and decide whether to approve it.
764764
type CreateMessageRequest struct {
765765
Request
766-
CreateMessageRequestParams `json:"params"`
766+
CreateMessageParams `json:"params"`
767767
}
768768

769-
type CreateMessageRequestParams struct {
769+
type CreateMessageParams struct {
770770
Messages []SamplingMessage `json:"messages"`
771771
ModelPreferences *ModelPreferences `json:"modelPreferences,omitempty"`
772772
SystemPrompt string `json:"systemPrompt,omitempty"`
@@ -932,10 +932,10 @@ type ModelHint struct {
932932
// CompleteRequest is a request from the client to the server, to ask for completion options.
933933
type CompleteRequest struct {
934934
Request
935-
Params CompleteRequestParams `json:"params"`
935+
Params CompleteParams `json:"params"`
936936
}
937937

938-
type CompleteRequestParams struct {
938+
type CompleteParams struct {
939939
Ref any `json:"ref"` // Can be PromptReference or ResourceReference
940940
Argument struct {
941941
// The name of the argument

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy