unity-mcp icon indicating copy to clipboard operation
unity-mcp copied to clipboard

Function to revise the code

Open Scriptwonder opened this issue 1 year ago • 4 comments

I think in previous works, have LLM look over the script for a second time could improve the script quality and possibly removing errors.

In the current project, I do not know how to include that revise function into the creation steps since manage_script will directly generate the c# code content and send it to the client. Ideally what I envision is that directly after LLM generate the content, it will analyze the content(with the help of the feedback from C# analysis side), and then revise the script.

I saw the comment you made on implementing better check, and I am working on it. Meanwhile I just want to know if there is a easier way to have Claude recheck its answer without directly sending to C# side. Still a WiP. Thanks!

Scriptwonder avatar Apr 02 '25 17:04 Scriptwonder

Image Just implemented the revise part with Roslyn(Need to test it first), got an additional question on the MCP part. When this response reaches the server, do LLM self-proceed with this response and decide what is the next step?(If it does get the response with the errors analyzed, will it decide revising the script and send it one more time? How can we MAKE that happen?)

Scriptwonder avatar Apr 02 '25 17:04 Scriptwonder

this should be handled with the manage_script tool call, but I can look into adjusting the prompt or parameters to make it more likely for the tool to be called correctly

justinpbarnett avatar Apr 09 '25 01:04 justinpbarnett

@Scriptwonder Is this addressed by your script validation update, or is that a separate issue? If good, we can close this one.

dsarno avatar Aug 11 '25 23:08 dsarno

There's now a validate tool that should help with this. Let me know if it works for you.

dsarno avatar Aug 31 '25 08:08 dsarno