Skip to main content
Glama

Create a custom script

action1_create_script
Destructive

Creates a custom script and adds it to the Script Library. Specify name, language, platform, and script text to automate endpoint management tasks.

Instructions

Create a custom script. Creates a new custom script and adds it to the Script Library. Perm: manage_scripts.

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body
confirmNoRequired to execute. Exact string "YES".
dry_runNoDefault true (preview). Set false to execute.

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
selfNo
toolNo
typeNo
paramsNo
statusNo
builtinNo
dry_runNo
languageNo
would_sendNo
descriptionNo
script_textNo
enterprise_idNo
success_codesNo
reboot_exit_codesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changedv0.6.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / body / description
      Previous value: -"Request body (schema: object)"New value: +"Request body"
    • addedInput schema / properties / body / properties
      Added value: +{
      +  "description": {
      +    "description": "The script description.",
      +    "type": "string"
      +  },
      +  "language": {
      +    "description": "The scripting language.",
      +    "enum": [
      +      "PowerShell",
      +      "Command",
      +      "Bash"
      +    ],
      +    "type": "string"
      +  },
      +  "name": {
      +    "description": "The script name.",
      +    "type": "string"
      +  },
      +  "params": {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "default": {
      +          "description": "Uses this value, unless a different value is specified.",
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "enum": [
      +            "String",
      +            "Int",
      +            "Float",
      +            "DateTimeString"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "platform": {
      +    "description": "The script platform.",
      +    "enum": [
      +      "Windows",
      +      "Mac",
      +      "Linux"
      +    ],
      +    "type": "string"
      +  },
      +  "reboot_exit_codes": {
      +    "description": "The exit codes that indicate a reboot is required.",
      +    "type": "string"
      +  },
      +  "script_text": {
      +    "description": "The script text.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / body / required
      Added value: +[
      +  "name",
      +  "language",
      +  "script_text",
      +  "platform"
      +]
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • addedOutput schema / properties / builtin
      Added value: +{}
    • addedOutput schema / properties / description
      Added value: +{}
    • addedOutput schema / properties / dry_run
      Added value: +{}
    • addedOutput schema / properties / enterprise_id
      Added value: +{}
    • addedOutput schema / properties / id
      Added value: +{}
    • addedOutput schema / properties / language
      Added value: +{}
    • addedOutput schema / properties / name
      Added value: +{}
    • addedOutput schema / properties / params
      Added value: +{}
    • addedOutput schema / properties / reboot_exit_codes
      Added value: +{}
    • addedOutput schema / properties / script_text
      Added value: +{}
    • addedOutput schema / properties / self
      Added value: +{}
    • addedOutput schema / properties / status
      Added value: +{}
    • addedOutput schema / properties / success_codes
      Added value: +{}
    • addedOutput schema / properties / tool
      Added value: +{}
    • addedOutput schema / properties / type
      Added value: +{}
    • addedOutput schema / properties / would_send
      Added value: +{}
  2. First observedv0.5.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already disclose that this is a non-readonly, destructive, non-idempotent operation. The description adds useful context with the required permission ('manage_scripts') and the destination ('Script Library'), but does not elaborate on duplicate handling, validation, or execution behavior.

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?

The description is short and front-loaded, with the action stated first. There is minor redundancy between 'Create a custom script' and 'Creates a new custom script,' but it remains efficient overall.

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

Completeness3/5

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

The rich input schema, output schema, and annotations cover most call mechanics, including required body fields, confirmation, and dry-run behavior. However, the description omits usage context relative to sibling tools, leaving a gap for an agent deciding when to create versus update or run a script.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents body, confirm, and dry_run. The description adds no parameter-level meaning beyond what the schema provides, making the baseline score of 3 appropriate.

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

Purpose4/5

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

States a specific verb and resource: 'Create a custom script' and clarifies it 'adds it to the Script Library.' The purpose is clear, though it does not explicitly differentiate this tool from siblings such as action1_update_script or action1_run_script.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives like update_script or run_script. It only notes the required permission, which is a prerequisite rather than usage context.

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

Deploy Server

Other Tools