Format MCP servers into the agent-specific file content. By default this returns pretty JSON for agents that use JSON configs.
(&self, servers: &BTreeMap<&str, &McpServerConfig>)
| 166 | /// Format MCP servers into the agent-specific file content. |
| 167 | /// By default this returns pretty JSON for agents that use JSON configs. |
| 168 | fn format_to_string(&self, servers: &BTreeMap<&str, &McpServerConfig>) -> Result<String> { |
| 169 | let output = self.format(servers); |
| 170 | serde_json::to_string_pretty(&output).context("Failed to serialize MCP config") |
| 171 | } |
| 172 | |
| 173 | /// Parse existing configuration file to extract mcpServers |
| 174 | fn parse_existing(&self, content: &str) -> Result<BTreeMap<String, Value>>; |