@@ -47,17 +47,25 @@ type McpServerRule struct {
4747}
4848
4949type ServerConfig struct {
50- Name string `json:"name,omitempty"`
51- Config map [string ]interface {} `json:"config,omitempty"`
50+ Name string `json:"name,omitempty"`
51+ Config map [string ]interface {} `json:"config,omitempty"`
52+ SecuritySchemes []* SecuritySchemes `json:"securitySchemes,omitempty"`
5253}
5354
5455type McpTool struct {
55- Name string `json:"name,omitempty"`
56- Description string `json:"description,omitempty"`
57- Args []* ToolArgs `json:"args,omitempty"`
58- RequestTemplate * RequestTemplate `json:"requestTemplate"`
59- ResponseTemplate * ResponseTemplate `json:"responseTemplate"`
60- ErrorResponseTemplate string `json:"errorResponseTemplate,omitempty"`
56+ Name string `json:"name,omitempty"`
57+ Description string `json:"description,omitempty"`
58+ Args []* ToolArgs `json:"args,omitempty"`
59+ RequestTemplate * RequestTemplate `json:"requestTemplate"`
60+ ResponseTemplate * ResponseTemplate `json:"responseTemplate"`
61+ ErrorResponseTemplate string `json:"errorResponseTemplate,omitempty"`
62+ Security * ToolSecurity `json:"security"`
63+ }
64+
65+ type ToolSecurity struct {
66+ Id string `json:"type,omitempty"`
67+ PassThrough bool `json:"passthrough,omitempty"`
68+ Credential string `json:"credential"`
6169}
6270
6371type ToolArgs struct {
@@ -80,6 +88,7 @@ type RequestTemplate struct {
8088 ArgsToJsonBody bool `json:"argsToJsonBody,omitempty"`
8189 ArgsToUrlParam bool `json:"argsToUrlParam,omitempty"`
8290 ArgsToFormBody bool `json:"argsToFormBody,omitempty"`
91+ Security * ToolSecurity `json:"security,omitempty"`
8392}
8493
8594type RequestTemplateHeaders struct {
@@ -125,8 +134,18 @@ type ServiceRef struct {
125134
126135// McpToolConfig Struct for mcp tool json unmarshal
127136type McpToolConfig struct {
128- Tools []* ToolDescription `json:"tools,omitempty"`
129- ToolsMeta map [string ]* ToolsMeta `json:"toolsMeta,omitempty"`
137+ Tools []* ToolDescription `json:"tools,omitempty"`
138+ ToolsMeta map [string ]* ToolsMeta `json:"toolsMeta,omitempty"`
139+ SecuritySchemes []* SecuritySchemes `json:"securitySchemes,omitempty"`
140+ }
141+
142+ type SecuritySchemes struct {
143+ Id string `json:"id,omitempty"`
144+ Type string `json:"type,omitempty"`
145+ Scheme string `json:"scheme,omitempty"`
146+ In string `json:"in,omitempty"`
147+ Name string `json:"name,omitempty"`
148+ DefaultCredential string `json:"defaultCredential,omitempty"`
130149}
131150
132151type ToolDescription struct {
@@ -148,8 +167,9 @@ type ToolsMeta struct {
148167}
149168
150169type JsonGoTemplate struct {
151- RequestTemplate RequestTemplate `json:"requestTemplate,omitempty"`
152- ResponseTemplate ResponseTemplate `json:"responseTemplate,omitempty"`
153- ArgsPosition map [string ]string `json:"argsPosition,omitempty"`
154- ErrorResponseTemplate string `json:"errorResponseTemplate,omitempty"`
170+ RequestTemplate RequestTemplate `json:"requestTemplate,omitempty"`
171+ ResponseTemplate ResponseTemplate `json:"responseTemplate,omitempty"`
172+ ArgsPosition map [string ]string `json:"argsPosition,omitempty"`
173+ ErrorResponseTemplate string `json:"errorResponseTemplate,omitempty"`
174+ Security * ToolSecurity `json:"security,omitempty"`
155175}
0 commit comments