You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add structured C# code generation/mutation tools powered by Roslyn that allow AI assistants to create, update, and delete C# code elements at a semantic level — rather than raw text editing via document_write/editor_replace.
Tools to Implement
Type Management
Tool
Description
cs_create_type
Create a new class, struct, record, interface, or enum in a specified file/namespace
cs_delete_type
Remove a type declaration from a file
cs_rename_type
Rename a type with Roslyn rename support (updates all references)
cs_modify_type
Change type modifiers (sealed, abstract, static, partial), base types, or implemented interfaces
Member Management
Tool
Description
cs_add_method
Add a method to a type with full signature and body
cs_update_method
Update a method's signature, body, or modifiers
cs_delete_method
Remove a method from a type
cs_add_property
Add a property with optional getter/setter/init bodies
cs_update_property
Update a property's type, accessors, or modifiers
cs_delete_property
Remove a property from a type
cs_add_field
Add a field with optional initializer
cs_update_field
Update a field's type, modifiers, or initializer
cs_delete_field
Remove a field from a type
Constructor and Event Management
Tool
Description
cs_add_constructor
Add a constructor with parameters and body
cs_update_constructor
Update constructor parameters or body
cs_delete_constructor
Remove a constructor
cs_add_event
Add an event declaration
cs_delete_event
Remove an event
Attribute and Using Management
Tool
Description
cs_add_attribute
Add an attribute to a type or member
cs_remove_attribute
Remove an attribute from a type or member
cs_add_using
Add a using directive to a file
cs_remove_using
Remove a using directive from a file
Enum Members
Tool
Description
cs_add_enum_member
Add a member to an enum with optional value
cs_delete_enum_member
Remove an enum member
Batch Operations
Tool
Description
cs_batch
Execute multiple code generation operations in a single transaction
Notes
All operations should use Roslyn SyntaxNode manipulation for correctness (proper formatting, trivia preservation)
Operations should respect existing code style (indentation, brace placement)
Batch mode allows multiple mutations atomically to avoid intermediate broken states
Description
Add structured C# code generation/mutation tools powered by Roslyn that allow AI assistants to create, update, and delete C# code elements at a semantic level — rather than raw text editing via
document_write/editor_replace.Tools to Implement
Type Management
cs_create_typecs_delete_typecs_rename_typecs_modify_typeMember Management
cs_add_methodcs_update_methodcs_delete_methodcs_add_propertycs_update_propertycs_delete_propertycs_add_fieldcs_update_fieldcs_delete_fieldConstructor and Event Management
cs_add_constructorcs_update_constructorcs_delete_constructorcs_add_eventcs_delete_eventAttribute and Using Management
cs_add_attributecs_remove_attributecs_add_usingcs_remove_usingEnum Members
cs_add_enum_membercs_delete_enum_memberBatch Operations
cs_batchNotes
SyntaxNodemanipulation for correctness (proper formatting, trivia preservation)cstool (86 actions)