How to register BuiltInToolscsharp
registry.Register(new AgentTool( ChangeNameName, "Changes the name of the assistant.", args => { string newName = ParseName(args); if (string.IsNullOrWhiteSpace(newName)) return "Error: name cannot be empty."; registry.InvokeNameChanged(newName); return $"Success: Name changed to {newName}."; }, new { type = "object", properties = new { name = new { type = "string", description = "The new name for the assistant." } }, required = new[] { "name" } }));