Skip to main content
Glama

fluent_exec

Run server-side scripts on a ServiceNow instance with a recorded reason and optional rollback, so changes can be traced and undone from Script Execution History.

Instructions

Run a server-side script on the instance through the SDK (now-sdk exec, 4.14+). Unlike a plain background script, the run is recorded on a Script Execution History record with your reason, and record changes can be rolled back from there. REQUIRES FLUENT_ENABLED=true and SCRIPTING_ENABLED=true.

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": {
      "script": "<script>",
      "reason": "<reason>"
    },
    "name": "fluent_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
authNonow-sdk credential alias (optional)
asyncNoRun as a background job and return a job_id at once. Poll it with get_job. Calls that take longer than about 20 seconds switch to a job on their own.
scopeNoScope to run in: app sys_id, scope name or "global"
reasonYesWhy the script is being run (stored on the execution history record)
scriptYesServer-side JavaScript to run
directoryNoFluent project directory, used for the default scope (optional)
server_logsNoInclude the instance session log, with stack traces
record_for_rollbackNoCreate a rollback context (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare the write/open-world/non-idempotent profile, and the description adds real substance on top: an audit record is created containing the supplied reason, record changes can be rolled back from that record, and two environment flags must be set. These are side effects and preconditions an agent could not infer from the annotations alone.

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

Conciseness5/5

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

Three short sentences, zero filler, and the primary purpose is front-loaded ahead of the contrast case and the environment requirements. The parenthetical SDK/version note is compact and useful.

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 an eight-parameter, open-world execution tool with no output schema, the definition covers preconditions, audit behavior, and rollback. It does not say what the call returns (script output? execution history id?) or how the optional auth alias affects targeting, which leaves a small gap given the lack of an output schema.

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 100%, so all eight parameters are already documented in the schema, including the async/job_id fallback and the rollback flag. The description's note that 'reason' is stored on the execution history record echoes what the schema already says, adding no new syntax, format, or constraint detail. Baseline 3 applies.

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 ('Run a server-side script on the instance through the SDK') and immediately distinguishes it from the generic case by contrasting with 'a plain background script.' An agent knows exactly what class of operation this is without opening the schema.

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 strong selection context: use this when you want the run recorded on an execution-history record and want rollback capability, as opposed to an untracked background script. It also states hard prerequisites (FLUENT_ENABLED=true and SCRIPTING_ENABLED=true). It stops short of naming a specific alternative tool for the untracked case.

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