Skip to main content
Glama

run_python_analysis

Execute Python code for financial analysis, quantitative backtesting, or generating charts. Runs in a sandboxed environment with pandas, numpy, and matplotlib support.

Instructions

Execute dynamic Python code for financial analysis, quantitative backtesting, calculations, or generating charts/plots. The code will be executed in a dedicated 'analysis' folder inside the project. Standard libraries like pandas, numpy, and matplotlib are fully supported. Any files generated (such as PNG charts or CSV files) will be saved in the 'analysis' folder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe Python code to execute. Can write files (e.g. plt.savefig("plot.png")) in the current working directory.
Behavior3/5

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

With no annotations, the description carries full burden. It discloses execution in a dedicated folder, standard library support, and file-saving capability. However, it omits the return value (e.g., stdout/stderr), error handling behavior, and security restrictions (e.g., no network access, time limits). These are critical for a code execution tool.

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?

Four short sentences, all essential. Front-loaded with purpose, followed by operational details. No redundant or irrelevant information. Highly concise.

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 explains execution context and file output, but given no output schema or annotations, it should also describe the tool's return value (e.g., execution result, errors) and limitations. This gap makes it incomplete for agents to use reliably without guessing.

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 coverage is 100% and the schema description says the code can write files in cwd. The tool description adds that execution happens in the 'analysis' folder and lists supported libraries, which is valuable context beyond the schema. Score above baseline 3 due to added detail.

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 it executes dynamic Python code for financial analysis, quantitative backtesting, calculations, and generating charts/plots. This distinguishes it from all sibling tools, which are specific data retrieval or analysis functions. The verb 'execute' and resource 'Python code for financial analysis' are specific and unambiguous.

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 description implies usage for custom analysis, backtesting, or charting not covered by other tools. It lists supported libraries and the execution folder. However, it does not explicitly state when NOT to use it (e.g., for simple data retrieval) or mention alternatives.

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/Techie03/trade-mcp'

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