Skip to main content
Glama

execute

Runs Python code with dynamically imported functions from SCRIPT nodes, merging dependencies and environment variables, then sanitizes output to protect secrets.

Instructions

Execute Python code with dynamically imported functions from SCRIPT nodes.

The system automatically:

  • Loads specified SCRIPT nodes

  • Merges their PEP 723 dependencies

  • Loads ENV variables from connected nodes AND directly specified envs

  • Executes code using 'uv run'

  • Sanitizes output to remove secret values

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython code to execute
envsNoList of ENV node names to load directly - can be list or JSON string (in addition to ENVs connected to imported scripts via CONTAINS)
importsNoList of SCRIPT node names to import - can be list or JSON string
timeoutNoExecution timeout in seconds (max 600)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are present, so the description carries full responsibility. It discloses several behavioral traits: automatic loading of SCRIPT nodes, merging PEP 723 dependencies, loading ENV variables, executing via 'uv run', and sanitizing output to remove secrets. This gives a good sense of what happens during execution, though it doesn't address side effects or security boundaries.

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?

The description is compact with a clear main line and bullet-pointed automatic behaviors. Every sentence adds value, no redundancy.

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?

The tool is a code executor with multiple automatic steps. The description covers the key aspects of loading, dependency merging, env handling, execution method, and output sanitization. With an output schema present, the lack of return-value detail is acceptable. However, it could mention error behavior or access to imported names for added completeness.

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 covers 100% of parameters, so baseline is 3. The description adds meaning by explaining that 'imports' are SCRIPT nodes with PEP 723 dependency merging, and that 'envs' are directly specified ENV nodes in addition to connected ones, enriching the schema's brief parameter descriptions.

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 identifies the tool as executing Python code and importing functions from SCRIPT nodes, using a specific verb ('Execute') and resource, distinguishing it from sibling tools like 'query' or 'env'.

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 context for using this tool (when you need to run Python code with SCRIPT node imports), though it doesn't explicitly state when to avoid it or mention alternatives. This fits 'clear context, no exclusions'.

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/fkesheh/mcp-kg-skills'

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