Skip to main content
Glama

davinci_project_validate

Validate ECU project configuration for consistency, completeness, and MICROSAR rule compliance, returning structured diagnostics. Run it after configuration changes and before code generation.

Instructions

校验 ECU 配置的一致性、完整性与 MICROSAR 规则(project validate)。

返回结构化 diagnostics(按严重级别计数 + findings 列表 + 涉及模块 Top N)。 修改配置后、生成代码前都应执行。

Args: project: .dvjson 工程文件。 bsw_package: BSW 包目录;缺省用 DAVINCI_BSW_PACKAGE。 modules: 只校验这些模块(短名如 "Rte" 或定义路径 "/MICROSAR/Rte")。 exclude_modules: 排除这些模块。 fail_on: 退出码阈值 NONE / ERROR / WARNING,默认 ERROR。 report_dir: 把报告写到该目录。 clean: 跳过 up-to-date 检查,强制完整校验。 no_save: 不把本次运行结果写回工程。 timeout_s: 命令硬超时秒数。 wait_seconds: 同步等待秒数,超时后转为后台作业并返回 job_id。

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": "<project>"
    },
    "name": "davinci_project_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
cleanNo
fail_onNoERROR
modulesNo
no_saveNo
projectYes
timeout_sNo
report_dirNo
bsw_packageNo
wait_secondsNo
exclude_modulesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.1/5.0
Behavior4/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 disclose meaningful behavior: results are written back to the project unless no_save is set, fail_on governs the exit-code threshold, and waits beyond wait_seconds degrade to a background job returning a job_id. It omits prerequisites such as whether the BSW package must resolve and who may run it, so it is not fully complete.

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 description leads with what the tool does and what it returns, then the timing advice, then the parameter list — a sensible front-loaded order. The Args block duplicates the schema's parameter names, which is justified given 0% schema coverage, though the document is longer than strictly necessary.

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?

For a 10-parameter validation tool with no annotations and no output schema, the definition covers purpose, timing, side effects, and all parameter semantics. It is weaker on what exactly is validated (which rule sets), how failures are reported to the agent beyond exit-code thresholds, and any pagination or size limits on the findings list.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 all parameter meaning, and it does: modules accepts short names or definition paths with examples, fail_on enumerates NONE/ERROR/WARNING with its default, clean forces a full run past up-to-date checks, and wait_seconds explains the sync-to-async transition. Every one of the 10 parameters is given operative meaning beyond its schema title.

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?

States a specific verb and object: validate ECU configuration consistency, completeness, and MICROSAR rules, and names the underlying command (project validate). It also previews the return shape (severity counts, findings, top modules). It does not distinguish itself from the sibling davinci_cfg5_validate or davinci_ecuc_audit, so it falls short of a 5.

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?

"修改配置后、生成代码前都应执行" gives clear usage timing — after config edits and before code generation — which is genuine guidance on when to call. It does not name alternatives or exclusions (for example, when to run ecuc_audit or cfg5_validate instead), so it is clear context without routing.

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