stripSidecarFields returns a shallow copy of sample with sidecar keys removed. The original map is never modified, even when no sidecars are configured — callers may mutate the returned map without affecting the caller's input.
(sample map[string]any, sidecars map[string]bool)
| 333 | // The original map is never modified, even when no sidecars are configured — |
| 334 | // callers may mutate the returned map without affecting the caller's input. |
| 335 | func stripSidecarFields(sample map[string]any, sidecars map[string]bool) map[string]any { |
| 336 | out := make(map[string]any, len(sample)) |
| 337 | for k, v := range sample { |
| 338 | if sidecars[k] { |
| 339 | continue |
| 340 | } |
| 341 | out[k] = v |
| 342 | } |
| 343 | return out |
| 344 | } |
| 345 | |
| 346 | // toolDisplayKey converts a snake_case MCP tool name into the hyphenated YAML |
| 347 | // frontmatter key (e.g. "create_pull_request" -> "create-pull-request"). |
no outgoing calls
no test coverage detected