Skip to main content
Glama
DP065U

OpenSTAAD MCP Server

by DP065U

Execute Python code

execute_code
Destructive

Run Python code in a sandbox to interact with STAAD.Pro models—define load cases, extract data, and set properties via the pre-connected staad object.

Instructions

Execute Python code in a sandbox against the OpenSTAAD API (don't forget to call discover_api and read_skills for API guidance).

The sandbox provides pre-connected staad (the OpenSTAAD root object) and input_data (if input_data_path is provided) variables (plus json and math modules). import statements, dir(), getattr(), ... are BLOCKED.

The last expression value or an explicit result = ... assignment is returned as the result. If output_data_path is provided, the sandbox will write the result to the specified file.

Paths must be on the user LOCAL filesystem and inside MCP roots or configured allowed_dirs. On Claude Desktop, users can configure allowed directories in the extension settings and Claude can use the filesystem copy_file_to_claude tool to move files to Claude's filesystem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source code to execute. Use the pre-injected ``staad`` variable to interact with the API. (don't forget to call discover_api and read_skills for API guidance)
instanceNoAlias (from ``list_instances``, e.g. ``staadPro1``) of the STAAD instance to target. If omitted, last opened instance is selected.
overwriteNoAllow overwriting an existing output file.
input_data_pathNoPath on user LOCAL filesystem to a ``.csv`` or ``.xlsx`` file. Its content is injected as the immutable `input_data` variable inside the sandbox. Use this to feed large datasets (e.g. node loads, section properties) into your code without hardcoding them.
output_data_pathNoPath on user LOCAL filesystem to a ``.csv`` or ``.xlsx`` file where to write the ``result`` value. Use this to avoid flooding the context window with large amount of data. The ``result`` variable must be formatted as one of: - List-of-lists → written as CSV or single-sheet xlsx: result = [["Node ID", "X", "Y", "Z"], [1, 0.0, 0.0, 0.0], ...] - Dict of sheet dicts → written as multi-sheet xlsx: result = { "Nodes": {"columns": ["Node ID", "X", "Y", "Z"], "rows": [[1, 0.0, 0.0, 0.0], ...]}, "Members": {"columns": ["Member ID", "Start", "End"], "rows": [[1, 1, 2], ...]} }

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Goes far beyond the annotations (destructiveHint=true, etc.): describes sandbox restrictions (blocked import, dir, getattr), pre-injected variables (staad, input_data, json, math), return value semantics (last expression or result assignment), file writing behavior, path constraints, and overwrite behavior. This provides comprehensive context for safe usage.

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 moderately long but each sentence carries operational weight—sandbox rules, return behavior, file I/O, and path security. It is well-structured in paragraphs and front-loaded with the core purpose. It could be slightly more compact, but the density is justified by the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (code execution, sandbox, file I/O, multiple parameters), the description covers all critical aspects: prerequisites, environment setup, return conventions, output data structures, filesystem constraints, and even a Claude Desktop workaround. With a strong schema and these descriptions, an agent is fully equipped to invoke the tool correctly.

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 meaningful context beyond the schema: explains pre-injected variables for the 'code' parameter, details the result variable format for output_data_path (list-of-lists or dict of sheets), and clarifies the 'overwrite' flag usage. This elevation to 4 reflects the added semantic value.

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?

The description clearly states the tool's function: 'Execute Python code in a sandbox against the OpenSTAAD API'. This is a specific verb+resource that distinguishes it from sibling tools (discover_api, read_skills, list_instances, get_status), which are for discovery/status, not code execution.

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?

Provides explicit usage context: instructs to call discover_api and read_skills for API guidance, suggests using output_data_path to avoid flooding context, and notes path restrictions. Does not explicitly contrast with alternative tools (none exist for execution), but effectively guides when and how to use the tool.

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/DP065U/STAAD-MCP'

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