Skip to main content
Glama
marlonluo2018

Pandas-MCP Server

run_pandas_code_tool

Execute pandas data analysis code securely with automatic safety checks and smart suggestions. Returns results or error messages.

Instructions

Execute pandas code with smart suggestions and security checks.

Args: code: Python code string containing pandas operations

Returns: dict: Either the result or error information

Forbidden Operations: The following operations are blocked for security reasons: - 'os.', 'sys.', 'subprocess.' - System access operations - 'open(', 'exec(', 'eval(' - Code execution functions - 'import os', 'import sys' - Specific dangerous imports - 'document.', 'window.', 'XMLHttpRequest' - Browser/DOM access - 'fetch(', 'eval(', 'Function(' - JavaScript/remote operations - 'script', 'javascript:' - Script injection attempts

Requirements: - Must assign final result to 'result' variable - Code should contain necessary imports (pandas available as 'pd')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
Behavior3/5

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

Since no annotations are provided, the description carries the full burden. It discloses security restrictions and code formatting requirements but does not mention resource limits, execution timeouts, or sandboxing details, leaving some behavioral aspects unclear.

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 clear sections (Args, Returns, Forbidden Operations, Requirements) and each sentence adds value. It is not overly verbose, though the list of forbidden operations is lengthy but necessary for security.

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

Completeness4/5

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

Given the tool's complexity as a code executor, the description covers security, required output format, and pre-imported pandas. It lacks details on execution limits or environment, but the essential context for safe usage is provided, making it fairly complete for a single-parameter tool.

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?

With 0% schema description coverage, the description must compensate. It explains the 'code' parameter as a Python string containing pandas operations and adds requirements, which is minimal but adequate. No further detail on expected code patterns or constraints beyond the listed forbidden operations.

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 executes pandas code with smart suggestions and security checks, using a specific verb and resource. It is easily distinguished from siblings like generate_chartjs_tool, interpret_column_data, and read_metadata_tool, which serve different purposes.

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 provides clear constraints on when to use the tool by listing forbidden operations and requirements, such as assigning the result to 'result' variable. However, it does not explicitly compare with sibling tools or state scenarios where alternatives would be preferred.

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/marlonluo2018/pandas-mcp-server'

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