Skip to main content
Glama
wattwong103

Ansys Rocky MCP

by wattwong103

Rocky Run Python

rocky_run_python

Execute arbitrary Python code in a persistent session to handle tasks not covered by dedicated tools. Variables persist across calls for stateful workflows.

Instructions

Run arbitrary Python code in the persistent Python session.

This is the escape hatch for anything the dedicated tools do not cover. The session keeps state between calls, so variables survive from one invocation to the next.

Input Schema

NameRequiredDescriptionDefault
codeYesPython source to execute.
timeoutNoMaximum number of seconds to wait for the code to finish.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the most important trait — session state persists across calls, so variables survive — which an agent must know. It says nothing about execution privileges, side effects on the Rocky project/session (e.g., does it mutate the model?), error semantics when code raises, or whether the session can be reset, all material for arbitrary code execution.

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?

Three short sentences, front-loaded with the action, with no wasted preamble. Slight redundancy: sentence one already says "persistent Python session" and sentence three restates persistence, so the statefulness could have been stated once and expanded once.

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?

Output schema exists and parameters are fully documented, so return values need not be explained. However, for an arbitrary-code-execution tool with no annotations, the description omits what an agent most needs before invoking: available modules/API surface inside the session, effect on persistent state of failures, and whether execution is sandboxed.

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 description coverage is 100%, with both `code` and `timeout` documented including a default, so the baseline of 3 applies. The description adds no extra semantics such as whether the timeout kills the session or how to access the Rocky API from inside `code`.

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 arbitrary Python code") and names the execution environment ("persistent Python session"), which no sibling tool occupies. The second sentence explicitly positions it against the domain-specific siblings, so an agent can distinguish it 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?

The phrase "escape hatch for anything the dedicated tools do not cover" gives a clear selection rule favoring the named-style siblings, which is unusually good routing context. It stops short of explicit exclusions (e.g., "prefer rocky_run_simulation for simulations") or guidance on what to do when the code fails.

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