Skip to main content
Glama
CoveoSec
by CoveoSec

scripts_run_snippet_code_script

Start a script execution on targeted endpoints by sending snippet code and endpoint filters via the Cortex XSIAM public API.

Instructions

Run Snippet Code Script

Initiate a new endpoint script execution action using provided snippet code. Cortex XDR supports sending your request in Base64.

Required license: Cortex XSIAM Premium or Cortex XSIAM Enterprise or Cortex XSIAM Enterprise Plus

[POST /public_api/v1/scripts/run_snippet_code_script] · Script execution

Example request body:

{
  "request_data": {
    "filters": [
      {
        "field": "endpoint_id_list",
        "operator": "in",
        "value": [
          "<endpoint ID>"
        ]
      }
    ],
    "snippet_code": "print (\"7\")"
  }
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_dataYesA dictionary containing the API request fields.
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states that the tool initiates a script execution, requires a license, and supports Base64, but does not disclose the side effects (e.g., executing arbitrary code on endpoints), whether it is asynchronous, how results are retrieved, or any safety considerations. This is a potentially impactful action, and the description is under-transparent.

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 reasonably concise and structured: a brief title, a one-sentence purpose, license requirement, API endpoint, and an example. The title repeats the tool name, but the example and endpoint info are useful. No unnecessary fluff, though the 'Run Snippet Code Script' line is redundant with the tool name.

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 description covers the request format with an example and lists the required license, but does not explain the response, how to check execution status, error handling, or that the operation is asynchronous. Given the nested schema and lack of output schema, this is adequate for making a request but incomplete for understanding the full workflow. The sibling tools for status/results are not referenced.

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 description coverage is 100%, so the baseline is 3. The description adds value by providing a concrete example request body that demonstrates how to structure nested objects (filters, snippet_code, endpoint_id_list). This clarifies the relationship between parameters and helps avoid malformed requests, going beyond the schema alone.

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?

The description clearly states the tool's function: 'Initiate a new endpoint script execution action using provided snippet code.' This identifies the specific verb (initiate/run) and resource (snippet code script). It does not explicitly contrast with sibling tools like scripts_run_script, but the phrase 'using provided snippet code' distinguishes it from running a pre-existing script, earning a 4 rather than 5.

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 provides prerequisites (required license) and a note about Base64 support, but it offers no guidance on when to choose this tool over alternatives. It does not mention that scripts_run_script should be used for existing scripts, nor does it state when to avoid this tool. No when-to-use or when-not-to-use information is included beyond the license requirement.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CoveoSec/xsiam-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server