Skip to main content
Glama

host_test

Compile and run native host unit tests without hardware, check both -O0 and -O3 for optimization-sensitive bugs, and isolate failing cases for diagnosis.

Instructions

Compile and run host (native) unit tests, no hardware needed / 主机单元测试.

Runs the project's driver (auto-detected Tests/run_host_tests.py) with a host C compiler. opt="both" runs -O0 and -O3 to catch optimization-sensitive bugs. On failure it re-runs per test with --only to name the failing cases. Use it standalone, or via workflow_pipeline as a pre-flash gate.

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": {
      "project_path": "<project_path>"
    },
    "name": "host_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
ccNo
optNoboth
onlyNo
scriptNo
timeout_sNo
project_pathYes
isolate_failuresNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does add real behavior: it auto-detects Tests/run_host_tests.py, uses a host C compiler, runs both -O0 and -O3 under opt="both", and re-runs per test with --only on failure. It does not disclose what happens if the script is missing, how timeout_s interacts with the run, or whether anything is written to disk.

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?

Front-loaded with the core action and scope, then layered detail in short sentences. The bilingual title fragment adds little for an English-reading agent but costs only a few tokens.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the core execution behavior is well covered. However, for a 7-parameter tool with zero schema coverage, the undocumented timeout_s and isolate_failures parameters leave meaningful gaps in how to invoke it 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?

Schema description coverage is 0% across 7 parameters, so the description must compensate and only partly does: it explains opt="both" semantics, the --only re-run behavior, and implies script auto-detection and cc (host C compiler). timeout_s, isolate_failures, and project_path are left entirely to the bare schema titles.

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?

States a specific verb pair (compile and run) plus the resource (host/native unit tests) and the key scope qualifier (no hardware needed), which implicitly separates it from firmware build tools like build_project. An agent can tell what this does without opening the schema.

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?

Explicitly says to use it standalone or via workflow_pipeline as a pre-flash gate, giving a concrete usage context. It stops short of stating when NOT to use it (e.g., when target hardware behavior is what's being tested), so it is clear but not exhaustive.

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