Skip to main content
Glama

Create Script

create_script

Create a new script in a project. Read the relevant get_documentation topics and use the schema tools first to build valid commands for the bot type. HTTP is a Protocol Bot script, BROWSER is a Browser Bot script, and PLAYWRIGHT is a Playwright script. "Browser script" is ambiguous: Browser Bot and Playwright are different types, so if the user's wording doesn't say which, ask before creating. Don't create multiple scripts of the same type for one task. Edit and reuse a script you created earlier in the session (same type, created by you, not used in a scenario or monitor elsewhere) instead of making a new one for a probe or a retry. Like every write on this surface, returns a summary — the server-assigned facts and a dashboard link — never the object you sent; the matching get tool reads it back.

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": {
      "projectId": "<projectId>",
      "script": "<script>"
    },
    "name": "create_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTag names; a name the team doesn't have yet becomes a new tag. Omit for no tags.
scriptYesThe script name, type (HTTP, BROWSER, or PLAYWRIGHT), commands, and variables. HTTP is a Protocol Bot script, BROWSER is a Browser Bot script, and PLAYWRIGHT is a Playwright script. "Browser script" is ambiguous: Browser Bot and Playwright are different types, so if the user's wording doesn't say which, ask before creating. Don't create multiple scripts of the same type for one task. Edit and reuse a script you created earlier in the session (same type, created by you, not used in a scenario or monitor elsewhere) instead of making a new one for a probe or a retry.
projectIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / tags
      Added value: +{
      +  "description": "Tag names; a name the team doesn't have yet becomes a new tag. Omit for no tags.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / script / description
      Previous value: -"The script name, type (HTTP, BROWSER, or PLAYWRIGHT), commands, and variables."New value: +"The script name, type (HTTP, BROWSER, or PLAYWRIGHT), commands, and variables. HTTP is a Protocol Bot script, BROWSER is a Browser Bot script, and PLAYWRIGHT is a Playwright script. \"Browser script\" is ambiguous: Browser Bot and Playwright are different types, so if the user's wording doesn't say which, ask before creating. Don't create multiple scripts of the same type for one task. Edit and reuse a script you created earlier in the session (same type, created by you, not used in a scenario or monitor elsewhere) instead of making a new one for a probe or a retry."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the write/safety profile; the description adds non-obvious behavior beyond them: the tool returns a server summary plus dashboard link rather than the submitted object, and the read-back path is named ('the matching get tool reads it back'). It also discloses a reuse/ownership condition governing repeat calls, which is not derivable from idempotentHint=false.

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

Conciseness3/5

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

Front-loaded with the core action, but roughly three sentences (type mapping, 'Browser script' ambiguity, no-duplicate rule) are reproduced verbatim in the script property's schema description, so a meaningful portion of the text does not earn its place at the tool level.

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

Completeness4/5

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

For a nested-object write tool with no output schema, the description covers prereqs, type ambiguity, reuse policy, and return shape — the pieces an agent needs before calling. The remaining gap is the commands/variables payload, which is delegated to get_command_schema/get_variable_schema, a reasonable but not fully closed handoff.

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 coverage is 67% and the nested script object documents its type enum and tags field itself. The description's parameter-level contribution is limited to restating the HTTP/BROWSER/PLAYWRIGHT mapping already present in the schema's script description, and it says nothing about projectId or the variables/commands structure beyond pointing at the schema tools. Baseline 3 for partial coverage with heavy reliance on structured fields.

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?

States a specific verb and resource ('Create a new script in a project') and immediately disambiguates the three script types (HTTP/BROWSER/PLAYWRIGHT). It also distinguishes this from update_script/duplicate_script by telling the agent to edit and reuse an existing script instead of creating a new one.

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

Usage Guidelines5/5

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

Explicit prerequisites ('Read the relevant get_documentation topics and use the schema tools first'), an explicit ambiguity rule ('if the user's wording doesn't say which, ask before creating'), and an explicit exclusion ('Don't create multiple scripts of the same type for one task'). The alternative path — edit and reuse a session-created script for probes/retries — is spelled out with its conditions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.