MCP Code Executor
Ejecutor de código MCP
El Ejecutor de Código MCP es un servidor MCP que permite a los LLM ejecutar código Python en un entorno Python específico. Esto permite a los LLM ejecutar código con acceso a las bibliotecas y dependencias definidas en el entorno. También admite la generación incremental de código para gestionar grandes bloques de código que pueden superar los límites de tokens.
Características
Ejecutar código Python desde las indicaciones de LLM
Soporte para la generación de código incremental para superar las limitaciones de tokens
Ejecutar código dentro de un entorno específico (Conda, virtualenv o UV virtualenv)
Instalar dependencias cuando sea necesario
Comprobar si los paquetes ya están instalados
Configurar dinámicamente el entorno en tiempo de ejecución
Directorio de almacenamiento de código configurable
Related MCP server: LLM Python Code Sandbox
Prerrequisitos
Node.js instalado
Uno de los siguientes:
Conda instalado con el entorno Conda deseado creado
Entorno virtual de Python
Entorno virtual UV
Configuración
Clonar este repositorio:
git clone https://github.com/bazinga012/mcp_code_executor.gitNavegue hasta el directorio del proyecto:
cd mcp_code_executorInstalar las dependencias de Node.js:
npm installConstruir el proyecto:
npm run buildConfiguración
Para configurar el servidor MCP Code Executor, agregue lo siguiente al archivo de configuración de sus servidores MCP:
Usando Node.js
{
"mcpServers": {
"mcp-code-executor": {
"command": "node",
"args": [
"/path/to/mcp_code_executor/build/index.js"
],
"env": {
"CODE_STORAGE_DIR": "/path/to/code/storage",
"ENV_TYPE": "conda",
"CONDA_ENV_NAME": "your-conda-env"
}
}
}
}Usando Docker
{
"mcpServers": {
"mcp-code-executor": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp-code-executor"
]
}
}
}Nota: El Dockerfile se ha probado únicamente con el tipo de entorno venv-uv. Otros tipos de entorno podrían requerir configuración adicional.
Variables de entorno
Variables requeridas
CODE_STORAGE_DIR: Directorio donde se almacenará el código generado
Tipo de entorno (elija una configuración)
Para Conda:
ENV_TYPE: Establecer encondaCONDA_ENV_NAME: Nombre del entorno Conda a utilizar
Para entorno virtual estándar:
ENV_TYPE: Establecer envenvVENV_PATH: Ruta al directorio virtualenv
Para UV Virtualenv:
ENV_TYPE: Establecer envenv-uvUV_VENV_PATH: Ruta al directorio del entorno virtual UV
Herramientas disponibles
El Ejecutor de Código MCP proporciona las siguientes herramientas a los LLM:
1. execute_code
Ejecuta código Python en el entorno configurado. Ideal para fragmentos de código cortos.
{
"name": "execute_code",
"arguments": {
"code": "import numpy as np\nprint(np.random.rand(3,3))",
"filename": "matrix_gen"
}
}2. install_dependencies
Instala paquetes de Python en el entorno.
{
"name": "install_dependencies",
"arguments": {
"packages": ["numpy", "pandas", "matplotlib"]
}
}3. check_installed_packages
Comprueba si los paquetes ya están instalados en el entorno.
{
"name": "check_installed_packages",
"arguments": {
"packages": ["numpy", "pandas", "non_existent_package"]
}
}4. configure_environment
Cambia dinámicamente la configuración del entorno.
{
"name": "configure_environment",
"arguments": {
"type": "conda",
"conda_name": "new_env_name"
}
}5. get_environment_config
Obtiene la configuración del entorno actual.
{
"name": "get_environment_config",
"arguments": {}
}6. initialize_code_file
Crea un nuevo archivo Python con el contenido inicial. Úselo como primer paso para código más largo que pueda exceder los límites de tokens.
{
"name": "initialize_code_file",
"arguments": {
"content": "def main():\n print('Hello, world!')\n\nif __name__ == '__main__':\n main()",
"filename": "my_script"
}
}7. append_to_code_file
Añade contenido a un archivo de código Python existente. Úsalo para añadir más código a un archivo creado con initialize_code_file.
{
"name": "append_to_code_file",
"arguments": {
"file_path": "/path/to/code/storage/my_script_abc123.py",
"content": "\ndef another_function():\n print('This was appended to the file')\n"
}
}8. execute_code_file
Ejecuta un archivo Python existente. Úselo como último paso tras compilar el código con initialize_code_file y append_to_code_file.
{
"name": "execute_code_file",
"arguments": {
"file_path": "/path/to/code/storage/my_script_abc123.py"
}
}9. read_code_file
Lee el contenido de un archivo de código Python existente. Úselo para verificar el estado actual de un archivo antes de añadir más contenido o ejecutarlo.
{
"name": "read_code_file",
"arguments": {
"file_path": "/path/to/code/storage/my_script_abc123.py"
}
}Uso
Una vez configurado, el Ejecutor de código MCP permitirá a los LLM ejecutar código Python generando un archivo en el CODE_STORAGE_DIR especificado y ejecutándolo dentro del entorno configurado.
Los LLM pueden generar y ejecutar código haciendo referencia a este servidor MCP en sus indicaciones.
Manejo de grandes bloques de código
Para bloques de código más grandes que puedan superar los límites de tokens LLM, utilice el enfoque de generación de código incremental:
Inicialice un archivo con la estructura básica usando
initialize_code_fileAgregue más código en llamadas posteriores usando
append_to_code_fileVerifique el contenido del archivo si es necesario usando
read_code_fileEjecute el código completo usando
execute_code_file
Este enfoque permite a los LLM escribir código complejo de varias partes sin encontrarse con limitaciones de tokens.
Compatibilidad con versiones anteriores
Este paquete mantiene la compatibilidad con versiones anteriores. Los usuarios de versiones anteriores que solo especificaron un entorno Conda seguirán trabajando sin cambios en su configuración.
Contribuyendo
¡Agradecemos sus contribuciones! Abra un problema o envíe una solicitud de incorporación de cambios.
Licencia
Este proyecto está licenciado bajo la licencia MIT.
Available Tools
9 toolsappend_to_code_fileA
Append content to an existing Python code file. Use this to add more code to a file created with initialize_code_file, allowing you to build up larger code bases in parts.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Full path to the file | |
| content | Yes | Content to append to the file |
TDQS
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. While it mentions the tool appends content, it doesn't disclose important behavioral traits like whether it requires file existence, handles file permissions, what happens on errors, or if it overwrites existing content. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with two sentences that each earn their place. The first sentence states the core purpose, and the second provides usage context and sibling tool reference. There's zero wasted text, and information is front-loaded appropriately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given this is a mutation tool with no annotations and no output schema, the description should do more to explain behavioral aspects. While it clearly states the purpose and usage guidelines, it lacks information about error conditions, file requirements, or what happens when the operation completes. For a tool that modifies files, this leaves important contextual gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 both parameters (file_path and content) adequately. The description doesn't add any parameter-specific information beyond what's in the schema, such as file path format requirements or content encoding details. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Append content') and target resource ('existing Python code file'), distinguishing it from sibling tools like initialize_code_file (creates new files) and read_code_file (reads without modifying). It provides a precise verb+resource combination with clear scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('to add more code to a file created with initialize_code_file') and provides a clear alternative context ('allowing you to build up larger code bases in parts'). It directly references a sibling tool for comparison, giving clear guidance on appropriate usage scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_installed_packagesC
Check if packages are installed in the conda environment
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | List of packages to check |
TDQS
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 checks installation status but doesn't describe what the output looks like (e.g., boolean per package, version details), error handling, or performance characteristics. This leaves significant gaps for an agent to understand how to interpret results.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose with zero waste. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., success/failure indicators, detailed package info), which is critical for a check operation. For a tool with no structured output documentation, the description should compensate more.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with the single parameter 'packages' clearly documented as 'List of packages to check'. The description adds no additional meaning beyond this, such as format examples (e.g., package names with versions) or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Check') and target ('packages are installed in the conda environment'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_environment_config' or 'install_dependencies', which might also provide package-related information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 doesn't mention prerequisites (e.g., whether a conda environment must be active), exclusions, or comparisons to sibling tools like 'get_environment_config' that might offer broader environment information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
configure_environmentC
Change the environment configuration settings
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Type of Python environment | |
| conda_name | No | Name of the conda environment (required if type is 'conda') | |
| venv_path | No | Path to the virtualenv (required if type is 'venv') | |
| uv_venv_path | No | Path to the UV virtualenv (required if type is 'venv-uv') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Change' implying a mutation, but doesn't specify permissions needed, whether changes are reversible, potential side effects, or error handling. This is inadequate for a configuration tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of environment configuration, no annotations, and no output schema, the description is insufficient. It lacks details on behavioral traits, usage context, and expected outcomes, making it incomplete for effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional meaning beyond the schema's details about environment types and paths, meeting the baseline for high coverage without extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Change the environment configuration settings' clearly states the action ('Change') and resource ('environment configuration settings'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_environment_config' (which likely reads rather than changes settings), leaving room for improvement in distinguishing functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 doesn't mention prerequisites, timing, or how it relates to sibling tools such as 'get_environment_config' or 'install_dependencies', leaving the agent without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_codeA
Execute Python code in the conda environment. For short code snippets only. For longer code, use initialize_code_file and append_to_code_file instead.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Python code to execute | |
| filename | No | Optional: Name of the file to save the code (default: generated UUID) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the environment ('conda environment') and a constraint on code length, but lacks details on execution behavior (e.g., timeout, output handling, error propagation) or safety considerations. It adds some context but is incomplete 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero waste: the first states the purpose and constraint, the second provides alternative guidance. It is front-loaded with essential information and appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description covers basic purpose and usage but lacks details on execution behavior, return values, or error handling. It is minimally viable for a code execution tool but has clear gaps in contextual information needed for reliable use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 both parameters ('code' and 'filename'). The description does not add any meaning beyond the schema, such as explaining what 'short code snippets' entail or how the filename is used. Baseline 3 is appropriate as the schema handles parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Execute Python code') and resource ('in the conda environment'), and explicitly distinguishes it from sibling tools by mentioning 'initialize_code_file and append_to_code_file' for longer code, making the purpose unambiguous and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('For short code snippets only') and when to use alternatives ('For longer code, use initialize_code_file and append_to_code_file instead'), offering clear context and exclusions without being misleading.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_code_fileA
Execute an existing Python file. Use this as the final step after building up code with initialize_code_file and append_to_code_file.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Full path to the Python file to execute |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions that it executes a Python file, implying mutation/runtime effects, but lacks details on permissions, safety (e.g., sandboxing), error handling, or output behavior. It adds some context about being a 'final step' but misses key behavioral traits for an 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose and followed by usage guidance. Every sentence earns its place with no wasted words, making it highly efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (executing code, which can have side effects), lack of annotations, and no output schema, the description is incomplete. It covers purpose and workflow but omits critical details like execution environment, return values, or error conditions, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 the 'file_path' parameter fully. The description does not add any meaning beyond what the schema provides (e.g., format examples or constraints), resulting in a baseline score of 3 as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Execute') and resource ('an existing Python file'), distinguishing it from siblings like 'execute_code' (which likely executes code directly) and 'read_code_file' (which only reads). It directly addresses what the tool does without being vague or tautological.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states when to use this tool ('as the final step after building up code with initialize_code_file and append_to_code_file'), providing clear context and naming specific alternatives (siblings) for the workflow. This gives strong guidance on its role versus other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_environment_configB
Get the current environment configuration
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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 'Get' implies a read operation, but doesn't specify what 'environment configuration' includes (e.g., variables, paths, dependencies), whether it requires permissions, if it's cached or real-time, or what happens on errors. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence: 'Get the current environment configuration.' It's front-loaded with the core action and resource, with no wasted words or redundant information. This is appropriately sized and efficient for a simple tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on output format, error handling, or how it differs from siblings. Without annotations or output schema, more context on return values or behavioral traits would improve completeness, but it's not entirely incomplete for such a simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details, which is appropriate since there are none to explain. This meets the baseline of 4 for tools with zero parameters, as there's no need to compensate for missing schema information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the current environment configuration' clearly states the verb ('Get') and resource ('environment configuration'), making the purpose understandable. However, it doesn't distinguish this tool from potential sibling tools like 'configure_environment' or 'check_installed_packages' that might also interact with environment settings, leaving some ambiguity about its specific scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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. With siblings like 'configure_environment' (which might modify settings) and 'check_installed_packages' (which might list installed components), there's no indication of whether this tool is for read-only access, current runtime settings, or other specific contexts. It lacks explicit when/when-not instructions or named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
initialize_code_fileA
Create a new Python file with initial content. Use this as the first step for longer code that may exceed token limits. Follow with append_to_code_file for additional code.
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Initial content to write to the file | |
| filename | No | Optional: Name of the file (default: generated UUID) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states this creates a new file (implying a write operation) and mentions token limit considerations, but doesn't specify file system permissions, error handling, or what happens if the file already exists. It adds some context but lacks comprehensive behavioral details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (two sentences) with zero wasted words. The first sentence states the core purpose, and the second provides crucial usage guidance. Every sentence earns its place and is front-loaded with essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a creation tool with no annotations and no output schema, the description does well by explaining the tool's role in a multi-step workflow and referencing its sibling. However, it doesn't mention what the tool returns (e.g., success confirmation, file path) or potential error conditions, leaving some gaps in completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain content formatting or filename conventions). Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Create a new Python file with initial content') and distinguishes it from its sibling 'append_to_code_file' by positioning it as 'the first step for longer code.' It explicitly names the resource (Python file) and verb (create), avoiding tautology.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('as the first step for longer code that may exceed token limits') and when to use an alternative ('Follow with append_to_code_file for additional code'). It clearly differentiates usage contexts between initialization and appending.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
install_dependenciesC
Install Python dependencies in the conda environment
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | List of packages to install |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('install') but doesn't reveal critical traits such as whether this requires admin permissions, if it's idempotent, potential side effects on the environment, or error handling. This leaves significant gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose, making it easy to parse quickly, which is ideal for conciseness in tool descriptions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool that performs installation (a mutation operation) with no annotations and no output schema, the description is inadequate. It lacks details on behavior, error cases, or what success looks like, leaving the agent under-informed about how to use it effectively in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the 'packages' parameter fully documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., package format examples or installation options), so it meets the baseline for high schema coverage without extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('install') and target ('Python dependencies in the conda environment'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from sibling tools like 'check_installed_packages' or 'configure_environment', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 like 'check_installed_packages' for verification or 'configure_environment' for setup. There's no mention of prerequisites, typical use cases, or exclusions, leaving the agent with minimal contextual direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_code_fileA
Read the content of an existing Python code file. Use this to verify the current state of a file before appending more content or executing it.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Full path to the file to read |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It correctly identifies this as a read operation and mentions the file must be 'existing,' but doesn't disclose error handling, file size limitations, encoding considerations, or what happens with non-existent files. The description provides basic behavioral context but lacks important operational details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two well-structured sentences that efficiently convey purpose and usage guidelines. Every word serves a clear function, with no redundant information or unnecessary elaboration. It's appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simple single-parameter read operation with no output schema, the description provides adequate context about when to use it and what it does. However, without annotations or output schema, it could benefit from more detail about return format, error conditions, or performance characteristics for a more complete picture.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'file_path' clearly documented as 'Full path to the file to read.' The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline expectation when schema coverage is complete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Read the content') and target resource ('an existing Python code file'), distinguishing it from siblings like append_to_code_file or execute_code_file. It provides a precise verb+resource combination that leaves no ambiguity about the tool's function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to use this tool ('to verify the current state of a file before appending more content or executing it'), providing clear context for its application. It distinguishes this read operation from potential write or execute operations performed by sibling tools, offering practical guidance on tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
9 tool updates
v1.0.0- First observed
append_to_code_file - First observed
check_installed_packages - First observed
configure_environment - First observed
execute_code - First observed
execute_code_file - First observed
get_environment_config - First observed
initialize_code_file - First observed
install_dependencies - First observed
read_code_file
TDQS
Each tool has a clearly distinct purpose with no ambiguity. For example, initialize_code_file, append_to_code_file, and read_code_file handle different file operations, while execute_code and execute_code_file target different execution methods. The descriptions explicitly differentiate tools like execute_code (for short snippets) versus the file-based workflow.
All tool names follow a consistent verb_noun pattern using snake_case, such as append_to_code_file, check_installed_packages, and configure_environment. There are no deviations in naming style or convention across the set, making them predictable and readable.
With 9 tools, the count is well-scoped for a code execution server. Each tool earns its place by covering distinct aspects like file management, environment configuration, dependency handling, and code execution, without being overly sparse or bloated.
The tool set provides complete coverage for the code execution domain, including CRUD-like operations for files (initialize, append, read), environment management (configure, get config, install dependencies), and execution (code snippets, files). There are no obvious gaps, and the workflow from file creation to execution is fully supported.
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Run Python code in a secure sandbox without local setup. Declare inline dependencies and execute s…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn interactive Python code execution environment that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.40Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to execute Python code in isolated sandboxes with file operations and MCP integration, supporting multi-round execution and plot capture.1-
- FlicenseAqualityDmaintenanceEnables LLMs to interact with Python environments, execute code, manage files, and handle packages through the Model Context Protocol.9-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to execute Python code securely in a sandboxed environment. Supports configurable restrictions like no network access and returns results including files.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/bazinga012/mcp_code_executor'
If you have feedback or need assistance with the MCP directory API, please join our Discord server