How to register SelfImprovementToolscsharp
registry.Register(new AgentTool( "self_improve_generate_tool", "Generates a new tool scaffold in the sandbox (category: core | addon | self). Requires an active sandbox.", InvokeGenerateTool, new { type = "object", properties = new { tool_name = new { type = "string", description = "Snake_case tool name, e.g. summarize_file." }, description = new { type = "string", description = "What the tool does (shown to the model)." }, category = new { type = "string", description = "core, addon, or self." }, invoke_body = new { type = "string", description = "Optional C# return expression/body, default returns OK." }, }, required = new[] { "tool_name", "description", "category" }, }, ToolCategory.Self));