@@ -258,7 +258,12 @@ public ComfyMcpCallResult watchJob(String promptId, double timeoutSeconds) {
258258 public ComfyMcpCallResult getQueue () { return job ("queue" , null , null ); }
259259
260260 public ComfyMcpCallResult systemStats () { return callTool ("system_stats" , null ); }
261- public ComfyMcpCallResult freeMemory () { return callTool ("free_memory" , null ); }
261+ public ComfyMcpCallResult freeMemory () { return freeMemory (true , null ); }
262+ public ComfyMcpCallResult freeMemory (boolean unloadModels , Boolean freeMemory ) {
263+ Map <String , Object > args = params ("unload_models" , Boolean .valueOf (unloadModels ));
264+ putIfNotNull (args , "free_memory" , freeMemory );
265+ return callTool ("free_memory" , args );
266+ }
262267
263268 public ComfyMcpCallResult fetchOutputs (String promptId , String outDir ,
264269 boolean urlOnly , boolean inlineImages ) {
@@ -309,7 +314,12 @@ public ComfyMcpCallResult getLogs(int tail, Integer port) {
309314 return callTool ("get_logs" , args );
310315 }
311316
312- public ComfyMcpCallResult discover () { return callTool ("discover" , null ); }
317+ public ComfyMcpCallResult discover () { return discover (true , "" ); }
318+ public ComfyMcpCallResult discover (boolean schemasOnly , String command ) {
319+ return callTool ("discover" , params (
320+ "schemas_only" , Boolean .valueOf (schemasOnly ),
321+ "command" , nullToEmpty (command )));
322+ }
313323 public ComfyMcpCallResult which () { return callTool ("which" , null ); }
314324
315325 public ComfyMcpCallResult project (String action ) {
0 commit comments