Skip to main content
Glama

Run npm script with structured output

npm_run

Runs npm scripts such as test or lint and parses Vitest/Jest output into structured per-file pass/fail results, falling back to raw output for non-test scripts.

Instructions

Runs any npm script (test, lint, etc.) and parses Vitest/Jest output into structured pass/fail results per file. Falls back to raw output for non-test scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoExtra environment variables
argsNoExtra args passed after --, e.g. ['--coverage', '--verbose']
scriptYesnpm script name to run, e.g. 'test', 'lint', 'test:unit'
project_dirYesAbsolute path to the project root
timeout_secondsNo
Behavior4/5

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 explicitly discloses that Vitest/Jest output is parsed into structured per-file results and falls back to raw output for non-test scripts, which shapes agent expectations. It omits side effects like dependency installation or exit-code behavior, but the core behavior is adequately revealed.

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 sentences, front-loaded with the core purpose and output behavior, with zero redundancy. Every word earns its place.

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 no output schema, the description's explanation of structured output and raw fallback provides sufficient context for invocation. It could elaborate on error handling or exit codes, but the essential information for calling the tool correctly is present, and sibling tools are clearly separated by their purposes.

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?

Schema description coverage is 80% (4/5 parameters have descriptions), so the schema already documents the parameters well. The description adds no additional meaning beyond the schema, meeting the baseline for high coverage without compensating for any gaps.

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 (runs) and resource (npm script) and explicitly differentiates from siblings like run_e2e_tests and typecheck by focusing on arbitrary npm scripts. The mention of parsing test output adds specificity, making it unmistakable which tool to use for unit tests.

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 clearly implies the tool is for running any npm script, particularly tests, and distinguishes it from e2e, typecheck, and build tools. However, it does not explicitly name alternatives or state when not to use this tool, leaving exclusions to inference rather than explicit guidance.

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/briancox730/dev-tools-mcp'

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