Skip to main content
Glama

run_python

Run Python scripts directly in the active Abaqus/CAE kernel to evaluate expressions, execute multi-line code, and return structured data via a result variable.

Instructions

Execute Python code in the active Abaqus/CAE kernel.

Single-line expressions are evaluated and returned. Multi-line scripts are executed; set a variable named result to return structured data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. It does disclose key runtime behavior: single-line expressions are evaluated and returned, multi-line scripts are executed, and `result` is the structured-return convention. It does not mention arbitrary side effects in the kernel, timeout behavior, or error handling, so transparency is only partial.

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, no filler, and the primary action is front-loaded. The additional return convention earns its place because it is essential for using multi-line scripts correctly.

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 output schema presumably covers return shape, and the result convention is stated. Still, for a powerful arbitrary-code execution tool there are gaps: no timeout semantics, no caution about kernel side effects, and no relationship to execute_script. Adequate but not complete.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must explain the parameters. It partially explains `code` by describing single-line versus multi-line behavior and the `result` variable, but it says nothing about the `timeout` parameter, including its units or what happens on timeout.

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 clear action and object: 'Execute Python code in the active Abaqus/CAE kernel.' This distinguishes it from domain-specific creation and query tools, but it does not explicitly differentiate it from the sibling execute_script, so an agent may still be unsure which code-execution tool to choose.

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?

Provides useful how-to guidance by distinguishing single-line expression evaluation from multi-line script execution and how to return structured data via the `result` variable. However, it never states when to prefer this tool over execute_script or what conditions make it inappropriate, leaving alternative selection implicit.

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