MCPcopy
hub / github.com/github/github-mcp-server / toHeaders

Method toHeaders

script/print-mcp-diff-configs/main.go:181–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181func (s settings) toHeaders() map[string]string {
182 h := map[string]string{}
183 if s.toolsets != "" {
184 h[mcphdr.MCPToolsetsHeader] = s.toolsets
185 }
186 if s.tools != "" {
187 h[mcphdr.MCPToolsHeader] = s.tools
188 }
189 if s.excludeTools != "" {
190 h[mcphdr.MCPExcludeToolsHeader] = s.excludeTools
191 }
192 if s.features != "" {
193 h[mcphdr.MCPFeaturesHeader] = s.features
194 }
195 if s.readOnly {
196 h[mcphdr.MCPReadOnlyHeader] = "true"
197 }
198 if s.insiders {
199 h[mcphdr.MCPInsidersHeader] = "true"
200 }
201 if s.lockdown {
202 h[mcphdr.MCPLockdownHeader] = "true"
203 }
204 if len(h) == 0 {
205 return nil
206 }
207 return h
208}
209
210func firstFeatureFlag() string {
211 flags := append([]string(nil), github.AllowedFeatureFlags...)

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected