Skip to main content
Glama

Create, replace or delete provision script

manage_provision
DestructiveIdempotent

Create, replace, or delete GenieACS provision scripts to control how devices are configured during inform sessions; remove scripts that are no longer needed.

Instructions

Create, replace or delete a GenieACS provision script. A provision is JavaScript that GenieACS runs during the inform session of every device a preset applies it to, so replacing one changes how those devices are configured. Scripts use the GenieACS sandbox API (declare, commit, clear, ext, log); ext() calls extension scripts that run on the ACS host with full privileges, so treat a provision as code running on your ACS. action="put" uploads or overwrites the script (raw JavaScript, not JSON; GenieACS answers 400 on a syntax error); action="delete" removes it. Presets reference provisions by name. Read genieacs://provisions/list first. Example script: log("Device " + DeviceID.ID + " informed");

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": {
      "action": "<action>",
      "name": "<name>"
    },
    "name": "manage_provision"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesThe provision name, its id on GenieACS.
actionYes"put" creates or replaces the script, "delete" removes it.
scriptNoFor action="put": the JavaScript source. Ignored for "delete".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.4.1
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / action / description
      Previous value: -"The operation to perform: \"put\" to create or update a provision, \"delete\" to remove it."New value: +"\"put\" creates or replaces the script, \"delete\" removes it."
    • addedInput schema / properties / action / enum
      Added value: +[
      +  "put",
      +  "delete"
      +]
    • changedInput schema / properties / name / description
      Previous value: -"The provision script name (used as the identifier in the URL)."New value: +"The provision name, its id on GenieACS."
    • addedInput schema / properties / name / minLength
      Added value: +1
    • changedInput schema / properties / script / description
      Previous value: -"The raw JavaScript source code of the provision script (required for action=\"put\", ignored for \"delete\"). GenieACS validates syntax before saving."New value: +"For action=\"put\": the JavaScript source. Ignored for \"delete\"."
  2. Addedv0.3.3

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive/idempotent/open-world, and the description adds substantial context beyond them: script is raw JavaScript (not JSON), a syntax error yields HTTP 400, ext() calls run on the ACS host with full privileges, and replacement alters device configuration. This materially upgrades the agent's risk model for a destructive write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and each sentence carries information (semantics, safety, actions, prerequisite, example). It is dense and slightly long, but no sentence is filler; the embedded example script could arguably be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter destructive mutation with no output schema, the description covers semantics, side effects, error behavior, privilege implications, and the recommended prerequisite read. An agent has everything needed to invoke it correctly and safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description adds real meaning: script must be raw JavaScript rather than JSON and is ignored for delete, and name is the provision's id referenced by presets. Enum values are also explained in prose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb triple (create/replace/delete) and the resource (GenieACS provision script), and the second sentence explains what a provision is and its effect. It is clearly distinguishable from siblings like manage_preset, which handles presets rather than the scripts presets reference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete operating guidance: read genieacs://provisions/list first, action="put" for upload/overwrite, action="delete" for removal, and warns that replacing changes how devices are configured. It stops short of naming sibling tools as alternatives (e.g., manage_preset) but the when-to-use context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.