Skip to main content
Glama

toolchain_detect

Detects CMake, Ninja, arm-none-eabi, and J-Link toolchains, returning resolved paths, versions, and build/debug readiness flags to verify embedded build environments.

Instructions

Discover CMake/Ninja/arm-none-eabi/J-Link toolchain / 探测本机嵌入式工具链.

Resolution order: jlink-project.json build.toolchain → EMBEDDED_* env vars → PATH → sibling of arm-none-eabi-gcc → common install locations. Returns paths, versions and build_ready/debug_ready flags. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "toolchain_detect"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does reasonably well: it declares 'Read-only', spells out the exact discovery fallback order (project config → env vars → PATH → sibling binary → common install dirs), and states the returned signals (paths, versions, build_ready/debug_ready). It does not say what happens when nothing is found or whether detection is cached, but the core behavioral picture is clear.

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 text is short and front-loaded: identity first, then resolution order, then return contract. The bilingual duplication of the opening line adds length without adding information for an English-reading agent, and the arrow-chained resolution order is compact but slightly terse.

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?

With an output schema present, the description needn't detail return shapes, and it nonetheless summarizes them. For a read-only single-parameter detection tool with no annotations, the resolution order and readiness flags cover what an agent needs; only the meaning of project_path remains a genuine gap.

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% and the sole parameter (project_path) has no description, so the definition should compensate. It partially does by mentioning 'jlink-project.json build.toolchain' as the first resolution source, hinting that project_path selects a project whose config file is read, but it never states whether the value is a directory or a file path, nor what the default (null) resolves to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Discover') plus the concrete resources it probes (CMake/Ninja/arm-none-eabi/J-Link), so the agent can immediately tell it apart from build or debug tools like build_project or connect_device. It stops short of explicitly contrasting with the closest sibling, diagnose_environment, leaving that distinction to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the resolution order and build_ready/debug_ready flags suggest it is a pre-flight capability check, but there is no explicit 'use this before X' or 'use diagnose_environment instead when Y'. The agent must infer when this tool is the right choice.

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