Skip to main content
Glama
JGCoelho

simple-sage-mcp

by JGCoelho

run_file

Run an existing file and return its exit code, duration, stdout and stderr inline. Choose an interpreter, pass arguments and stdin, and set a timeout to capture output or fail on errors.

Instructions

Run a file that already exists and return its output inline: exit code, duration, stdout and stderr. Nothing is copied or stored -- the file you name is the file that runs, with cwd = its own directory. lang=auto guesses from the extension and honours a #! for executables; lang=python uses Sage's own interpreter (so from sage.all import * works) and lang=sage shells out to sage. A non-zero exit or a timeout is an error, with the output attached; the timeout kills the whole process group.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory (default: the file's own directory).
argsNoArguments appended to the command line.
langNoInterpreter; auto uses the extension, then the #! line.
pathYesThe file to run (absolute or relative to this server's cwd).
stdinNoText fed to the file on stdin.
timeout_sNoSeconds before the process group is killed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations provided, the description carries the behavioral burden well. It discloses that output is returned inline, nothing is copied or stored, cwd defaults to the file's own directory, `lang=auto` and `lang=python`/`lang=sage` behave differently, non-zero exits and timeouts are treated as errors with output attached, and timeouts kill the whole process group.

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 front-loaded with the core action and return behavior, then adds execution semantics, interpreter details, and error handling. It is dense but every sentence contributes relevant information without obvious padding.

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?

There is no output schema and no annotations, so the description must cover return behavior and process execution semantics. It does this well, including output contents, error conditions, and timeout behavior, but it does not address edge cases such as output truncation, environment handling, or permission requirements.

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 already has 100% description coverage, so the baseline is 3. The description adds useful meaning beyond the schema, especially for `lang` behavior, cwd semantics, and the fact that timeout kills the entire process group, though it does not discuss `args` or `stdin`.

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 states a specific verb and resource: run an existing file and return exit code, duration, stdout, and stderr. It is clearly distinct from general command execution because it emphasizes that the named file is the file that runs, with cwd defaulting to its directory, though it does not explicitly name the sibling `exec` tool.

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?

Usage is implied by the description: use this when running an existing file and wanting inline output. However, it gives no explicit when-not-to-use guidance and does not compare itself directly against sibling tools like `exec` or `poll`.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools