Skip to main content
Glama

Run Tests

run_tests
Read-only

Run the project's Jasmine spec files (helpers/.spec.tsx) headlessly on the project VM (jsdom — no browser needed). Frontend AND backend code is testable: specs may render components (@testing-library/react) or import endpoint handlers/backend helpers and call them directly. Limits: fetch throws inside tests (mock with spyOn(globalThis, "fetch")), process.env secrets are absent (give a module that reads one at load a dummy value from a helper the spec imports BEFORE it, e.g. helpers/testEnv.tsx setting process.env.JWT_SECRET = "test-secret"; env is reset per spec file), spyOn cannot replace an exported function of a project module (pass dependencies in as arguments instead), no top-level await in specs, and @floot/ services (email, storage, ai, queueTask, …) never run: each function is a Jasmine spy that throws until the spec gives it a result on the imported function itself, e.g. (sendEmail as jasmine.Spy).and.resolveTo({ ok: true, messageId: "m1" }); spies reset before every spec. Returns per-file PASS/FAIL with failing expectations. Defaults to all spec files except hook specs (file name contains "use" — those need real React scheduling and are excluded, matching the in-editor checker); pass paths to run specific spec files, including hook specs.

Input Schema

NameRequiredDescriptionDefault
pathsNo
projectIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With readOnlyHint/destructiveHint/openWorldHint already covering safety, the description goes far beyond them: fetch throwing, per-spec env reset, spyOn limits on exported module functions, no top-level await, @floot services behaving as throwing spies until resolved, and spy reset cadence. It also discloses the return shape (per-file PASS/FAIL with failing expectations).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and scope are front-loaded in the opening sentence, followed by limits and defaults. The single dense paragraph is information-rich but borders on run-on, making it slightly harder to scan than it could be.

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 complex test-runner with no output schema and no annotations about returns, the description supplies return format, default selection behavior, and a substantial list of environment gotchas. The main remaining gap is the undefined `projectId` and no mention of timeouts or async behavior for long suites.

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 0%, so the description must carry the load. It explains `paths` well (targets specific spec files and re-includes hook specs) but says nothing about what `projectId` identifies or its format, leaving half the parameters undocumented.

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?

First sentence names a specific verb (run), resource (the project's Jasmine spec files), pattern (helpers/*.spec.tsx), and environment (headlessly on the project VM, jsdom). This clearly separates it from siblings like typecheck or run_code_in_vm.

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?

It states the default scope (all spec files except hook specs) and when to override it (pass `paths` for specific spec files, including hook specs). It also clarifies that both frontend and backend code are testable, but it never explicitly contrasts itself against the sibling typecheck or run_code_in_vm.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources