Skip to main content
Glama

run_pjsr_file

Run a PJSR JavaScript file from disk inside PixInsight and retrieve its console output for automation or debugging.

Instructions

Run a PJSR (JavaScript, V8 engine) source file from disk inside PixInsight and return its console output. Same execution model as run_pjsr, with the code read from a file instead of passed inline. No ES6 module syntax; the file content is eval-ed, so #include does not work.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the PJSR source file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden and does a solid job: it reveals that the file is eval-ed, that ES6 modules are unsupported, that #include will not work, and that console output is returned. It does not discuss error handling or potential side effects of arbitrary script execution, but the most significant execution-model behaviors are disclosed.

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?

Two dense sentences, each earning its place. The first states the action, environment, and output; the second distinguishes from the sibling and warns about syntax limitations. No filler or 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?

For a one-parameter tool with no output schema, the description covers what the tool does, how it executes code, its key limitations, and its return value. It could specify error behavior or timeout characteristics, but it is sufficiently complete for an agent to select and invoke the tool correctly.

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?

The schema already fully documents the single parameter with a clear description of an absolute file path. The tool description only restates that the code is read from a file on disk, which adds no real semantic value beyond the schema. Baseline 3 applies because schema coverage is complete.

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 states a specific verb and resource: running a PJSR JavaScript source file from disk inside PixInsight and returning its console output. It explicitly distinguishes itself from the sibling run_pjsr by noting the code comes from a file instead of being passed inline.

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 references run_pjsr as the same execution model and clarifies the file-vs-inline distinction, which effectively tells the agent when this tool is appropriate. It also adds important constraints about eval semantics and the lack of ES6 module syntax. It does not spell out an explicit when-not-to-use rule, but the condition is strongly implied.

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