Skip to main content
Glama
hexpress-mcp

hexpress-mcp

by GaillumXc

Run Script

run_script

Runs a Python 2 script inside headless HEXPRESS batch mode with the HXP API preloaded, returning captured stdout, process log tail, and script return values.

Instructions

Run a Python 2 script inside headless HEXPRESS (-batch -script).

The script executes with the embedded HXP API preloaded (HXP.open_project, HXP.generate_initial_mesh, HXP.insert_viscous_layers, ... — see _python/_igg/HXP.py in the install), wrapped so that its stdout (which HEXPRESS batch mode otherwise swallows) is captured, and a SCRIPT_RETURN_VALUE line — printed as print "SCRIPT_RETURN_VALUE", 0 — or 0/1 on success/exception is read back from a result file. Provide exactly one of script_text (written to a temp file) or script_file. Returns returncode, script_return_value, captured script stdout and the process log tail.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNo
install_dirNo
script_fileNo
script_textNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: Python 2 only, batch-mode stdout being swallowed and then captured, the SCRIPT_RETURN_VALUE print convention, and the success/exception-to-0/1 fallback. It leaves out whether the script can mutate the project destructively, timeout behavior, and permission requirements, which is a real but smaller gap.

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?

Front-loaded with the essential verb and environment, then layered detail in decreasing priority. Dense but mostly earns its words, though the aside pointing at _python/_igg/HXP.py and the long parenthetical about stdout capture could be tightened.

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?

Covers execution model, input contract, and return fields for a fairly complex tool; an output schema exists so the return-value sentence is a bonus rather than a necessity. The main shortfall is silence on timeout defaulting and install_dir, both of which affect correct invocation.

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 0% for four parameters, and the description explains two of them well (script_text written to a temp file, script_file, and the exactly-one-of rule). timeout and install_dir are never mentioned, so the description only partially compensates for the undocumented schema.

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 (run), resource (a Python 2 script), and execution environment (headless HEXPRESS via -batch -script). This is clearly distinguishable from siblings like run_mesh or convert_cad, which operate on meshes or files rather than arbitrary scripts.

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

Usage Guidelines3/5

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

Usage is implied by the 'inside headless HEXPRESS' framing and the 'Provide exactly one of script_text or script_file' constraint, which is genuine invocation guidance. However, it never states when to prefer this over run_mesh or the conversion siblings, nor any prerequisites (license, project state) for running a script.

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