add_field_to_model
Add a field to a model, class, or interface across Prisma, Python, and TypeScript files without raw text edits.
Instructions
Add a field to a model/class/interface. Supports .prisma, .py (dataclass, SQLAlchemy), .ts/.tsx.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"field_name": "<field_name>",
"field_type": "<field_type>"
},
"name": "add_field_to_model"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Insert after the line containing this string. | |
| model | Yes | Model/class/interface name. | |
| project | No | Project name/path (default: active). | |
| file_path | No | Optional file path to disambiguate. | |
| field_name | Yes | Name of the new field. | |
| field_type | Yes | Type of the field (e.g. 'String', 'DateTime?', 'number'). |