Skip to main content
Glama

run_python

Execute Python code to process documents, manipulate files, and perform custom data operations within Docsmith MCP's secure environment.

Instructions

Execute Python code for flexible file operations, data processing, and custom tasks. Supports any file format and Python libraries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython code to execute. Access files using their absolute paths.
packagesNoPackage mappings (import_name -> pypi_name) for required dependencies
file_pathsNoFile paths that the code needs to access

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
resultNo
stderrNo
stdoutNo
successNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Supports any file format and Python libraries', which hints at capabilities, but lacks critical behavioral details: it doesn't mention security implications (e.g., sandboxing, permissions), resource limits (e.g., execution time, memory), error handling, or output format. For a powerful tool like code execution, this is a significant gap in transparency.

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 concise with two sentences that efficiently cover the tool's purpose and capabilities. It's front-loaded with the core function ('Execute Python code') and avoids unnecessary details. However, it could be slightly more structured by separating use cases or adding a brief example, but overall, it's well-sized with minimal waste.

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's complexity (code execution with 3 parameters, no annotations, but an output schema exists), the description is moderately complete. It covers the high-level purpose and capabilities but lacks depth in usage guidelines, behavioral transparency, and parameter semantics. The presence of an output schema means return values are documented elsewhere, reducing the burden on the description, but for a tool with potential security and resource implications, more context is needed to be fully helpful.

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%, so the schema already documents all three parameters (code, packages, file_paths) with descriptions. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter interactions, provide examples, or clarify semantics like how 'packages' mappings work or how 'file_paths' are accessed. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't compensate with extra insights.

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?

The description clearly states the tool's purpose with the verb 'Execute' and resource 'Python code', specifying it's for 'flexible file operations, data processing, and custom tasks'. It distinguishes from sibling tools (get_document_info, read_document, write_document) by focusing on code execution rather than document operations, though it doesn't explicitly name those alternatives. The purpose is specific but could be more precise about what distinguishes it from similar code execution tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'flexible file operations, data processing, and custom tasks' but doesn't specify scenarios where run_python is preferred over sibling tools like write_document for file operations or other code execution methods. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent with minimal contextual guidance.

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/mcpc-tech/docsmith-mcp'

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