set_config
Validate and preview FortiGate configuration changes before applying them; update, create, or delete endpoints with schema-checked fields and dry-run output.
Instructions
Change any configuration endpoint, validated against the FortiGate's schema first: field names, option values, integer ranges, string lengths, and table vs single-object rules. action is update (default), create or delete. With dry_run (the default) nothing is sent; the result shows the request and each field's current and new value. Fields that reference other objects take a list of names, e.g. srcaddr: ['LAB-NET'].
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": {
"endpoint": "<endpoint>"
},
"name": "set_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mkey | No | Entry key; required to update or delete a table entry | |
| vdom | No | VDOM (default: FORTIGATE_VDOM, usually root) | |
| action | No | update, create or delete (default update) | |
| fields | No | Field values, using the schema's hyphenated names | |
| dry_run | No | Only validate and show the change (default true) | |
| endpoint | Yes | e.g. log/setting, firewall/local-in-policy |