MCPcopy Create free account
hub / github.com/github/gh-aw / renderDefaultJSONMCPConfig

Function renderDefaultJSONMCPConfig

pkg/workflow/mcp_renderer_factory.go:95–111  ·  view source on GitHub ↗

renderDefaultJSONMCPConfig is a convenience wrapper for renderStandardJSONMCPConfig used by simple JSON engines (Claude, Gemini, Crush, OpenCode) that share the standard renderCustomMCPConfigWrapperWithContext callback and differ only in their config path.

(
	sb *strings.Builder,
	tools map[string]any,
	mcpTools []string,
	workflowData *WorkflowData,
	configPath string,
)

Source from the content-addressed store, hash-verified

93// simple JSON engines (Claude, Gemini, Crush, OpenCode) that share the standard
94// renderCustomMCPConfigWrapperWithContext callback and differ only in their config path.
95func renderDefaultJSONMCPConfig(
96 sb *strings.Builder,
97 tools map[string]any,
98 mcpTools []string,
99 workflowData *WorkflowData,
100 configPath string,
101) error {
102 return renderStandardJSONMCPConfig(sb, renderStandardJSONMCPConfigOptions{
103 tools: tools,
104 mcpTools: mcpTools,
105 workflowData: workflowData,
106 configPath: configPath,
107 renderCustom: func(builder *strings.Builder, toolName string, toolConfig map[string]any, isLast bool) error {
108 return renderCustomMCPConfigWrapperWithContext(builder, toolName, toolConfig, isLast, workflowData)
109 },
110 })
111}
112
113// renderStandardJSONMCPConfig is a shared helper for JSON MCP config rendering used by
114// Claude, Gemini, Copilot, and Codex engines. It consolidates the repeated sequence of:

Callers 6

RenderMCPConfigMethod · 0.85
RenderMCPConfigMethod · 0.85
RenderMCPConfigMethod · 0.85
RenderMCPConfigMethod · 0.85
RenderMCPConfigMethod · 0.85
RenderMCPConfigMethod · 0.85

Tested by

no test coverage detected