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)
| 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. |
| 13 | func 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 | |
| 20 | func shouldAttachIFCLabel(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult) bool { |
| 21 | return r != nil && !r.IsError && deps.IsFeatureEnabled(ctx, FeatureFlagIFCLabels) |
no outgoing calls
no test coverage detected