Skip to main content
Glama
anaseqal

MCP Code Mode

by anaseqal

run_python

Execute Python code to perform any task: HTTP requests, data processing, file operations, system commands, image manipulation, and more with auto-install of needed packages.

Instructions

Execute Python code to accomplish ANY task.

This is a universal tool - write Python to do what you need:

  • HTTP requests (requests, httpx, aiohttp)

  • Parse HTML (beautifulsoup4, lxml)

  • Process data (pandas, json, csv)

  • File operations (pathlib, shutil)

  • System commands (subprocess)

  • Images (Pillow, opencv)

  • And anything else Python can do!

Args: code: Python code to execute. Use print() for output. description: Brief task description (for logging) timeout: Max execution time in seconds auto_install: Auto-install missing packages

Returns: Execution result with stdout, stderr, status, and any generated images

Example: code = ''' import requests resp = requests.get("https://api.github.com/users/octocat") data = resp.json() print(f"User: {data['login']}") print(f"Repos: {data['public_repos']}") '''

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
descriptionNo
timeoutNo
auto_installNo
Behavior3/5

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

No annotations are provided, so the description must convey behavioral traits. It states that code execution occurs, returns stdout/stderr/status/images, and mentions timeout and auto-install. However, it does not disclose potential security implications, execution environment restrictions, or that any code run could be dangerous. This omission is notable for a tool that runs arbitrary code.

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 well-structured with a summary, bullet list of capabilities, clear Args section, Returns line, and an example. It is front-loaded with the primary purpose. While somewhat lengthy due to the example and extensive list, every part adds value. It could be slightly more concise but remains effective.

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?

Given the tool has 4 parameters, no output schema, and no annotations, the description covers purpose, parameters, return format, and provides an example. However, it lacks usage guidelines, security warnings, and context about when to prefer siblings. It is adequate but not fully complete for a tool of this complexity.

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?

The input schema has 0% description coverage, but the tool description explains each parameter in the Args section: 'code: Python code to execute. Use print() for output.', 'description: Brief task description (for logging)', 'timeout: Max execution time in seconds', 'auto_install: Auto-install missing packages'. This adds meaning beyond the schema's titles and types.

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 purpose: 'Execute Python code to accomplish ANY task.' It lists numerous capabilities (HTTP requests, parsing, data processing, etc.), making the scope unmistakable. The tool name 'run_python' is self-explanatory, and the description reinforces its universality.

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?

The description positions the tool as 'universal' and lists many use cases, but it does not provide guidance on when not to use it or suggest alternative tools. Siblings like 'pip_install' and 'run_python_stream' exist, but no distinctions are made. The description lacks explicit context for appropriate vs. inappropriate usage.

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/anaseqal/codemode'

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