Skip to main content
Glama

Run Tests

run_tests
Read-only

Run the project's Jasmine specs (helpers/.spec.tsx) on the project VM (jsdom): specs may render components (@testing-library/react) or call endpoint handlers and backend helpers 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectId": "<projectId>"
    },
    "name": "run_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathsNo
projectIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses extensive runtime behavior: fetch throws, secrets are absent, env is reset per spec file, exported functions cannot be spied on, top-level await is disallowed, and @floot services are throwing spies until configured. It also states the return shape as 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?

The purpose and defaults are front-loaded, and the many environment constraints are relevant rather than filler. However, the description is a dense single paragraph with long parenthetical clauses, so it could be easier to scan if structured into shorter sections.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a test runner with no output schema, the description covers defaults, hook-spec exclusion, environment constraints, mocking rules, and return values in enough detail for an agent to call it correctly. The only notable omission is explicit `projectId` semantics, which is minor relative to the overall completeness.

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 parameter meaning. It explains `paths` thoroughly, including that hook specs are excluded by default but can be run explicitly, but it never explains `projectId` or how it identifies the target project VM.

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 opens with a specific verb and resource: running the project's Jasmine specs in helpers/*.spec.tsx on the project VM using jsdom. It clearly scopes the tool to test execution rather than generic code execution or type checking, distinguishing it from siblings such as typecheck and 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 explains the default behavior: all spec files except hook specs, and says to pass `paths` to run specific files including hook specs. It does not explicitly compare this tool to typecheck or run_code_in_vm, but the test-runner context makes the intended use clear.

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