Propose a new policy
create_policyPropose creating a new policy, optionally with setting changes. With fromPolicyId it is a copy (duplicate) of that policy - its apps, settings and restrictions. Without it, it is a new policy from scratch with Nomid's defaults (the Nomid Settings agent, device reporting, Play Protect enforced, the standard Android home screen, no other apps), in the default group. When the user asks for a new policy without naming one to copy, create it from scratch; do not pick a policy to copy for them. Before a policy from scratch, unless the user already said what it is for or what it needs, or asked for it to be created right away, ask what the policy is for (which devices, used by whom, for what); then, only for what matters for that use and was not answered yet, ask once more in a few short questions: one app in kiosk mode or several apps, which apps or websites, Wi-Fi, and what to lock down (camera, USB, factory reset, Play Store). Then propose it with the settings that follow, and its apps once it exists. Once it exists, add apps with propose_policy_change with apps and set Wi-Fi and anything else with propose_policy_change with edits; once its apps are in, turn kiosk mode on (or the launcher, with its dock) with propose_policy_change with homeScreen. Nothing is created yet: this returns a proposal with the change list. Show it to the user and get their explicit approval. No device uses the new policy until one is moved to it (send_device_command with command change_device_policy). Once the user approves, apply it with apply_policy_proposal (a person approves a HIGH impact one in the Nomid portal instead: give the user its approvalUrl).
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": {
"displayName": "<displayName>"
},
"name": "create_policy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | No | Settings to change, each at most once. Ids and allowed values come from get_policy_settings (the same for every policy). | |
| company | No | Optional: a `company` value from list_companies to run this in. Omit it for the connection's own company. | |
| displayName | Yes | Name of the new policy, as shown in the portal (at most 30 characters). | |
| fromPolicyId | No | Path name of the existing policy to copy (apps, settings, restrictions) - "pathName" from list_policies. Omit it to create a policy from scratch. |