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

Function setIFCLabel

pkg/github/ifc_labels.go:13–18  ·  view source on GitHub ↗

setIFCLabel writes the given IFC security label into a tool result's _meta under the "ifc" key, allocating the Meta map if necessary.

(r *mcp.CallToolResult, label ifc.SecurityLabel)

Source from the content-addressed store, hash-verified

11// setIFCLabel writes the given IFC security label into a tool result's _meta
12// under the "ifc" key, allocating the Meta map if necessary.
13func setIFCLabel(r *mcp.CallToolResult, label ifc.SecurityLabel) {
14 if r.Meta == nil {
15 r.Meta = mcp.Meta{}
16 }
17 r.Meta["ifc"] = label
18}
19
20func shouldAttachIFCLabel(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult) bool {
21 return r != nil && !r.IsError && deps.IsFeatureEnabled(ctx, FeatureFlagIFCLabels)

Calls

no outgoing calls

Tested by

no test coverage detected