Skip to main content
Glama

davinci_project_generate

Generates BSW and RTE C code from a DaVinci .dvjson project, with module selection, exclusions, output overrides, and background job polling for long runs.

Instructions

生成 BSW 与 RTE 的 C 代码(project generate)。

不传 modules 时生成全部模块。生成通常较慢:超过 wait_seconds 会返回 job_id, 用 davinci_job_status 轮询,完成后用 davinci_scan_output 查看产物。

Args: project: .dvjson 工程文件。 bsw_package: BSW 包目录。 modules: 指定生成模块;支持 "from-project" 表示工程设置中的模块。 exclude_modules: 排除模块。 output_dir: 覆盖本次生成的根输出目录(不修改工程设置)。 generation_type: REAL 或 VTT。 report_dir: 生成报告输出目录。 ext_steps: 指定外部生成步骤。 clean_generate: 跳过 up-to-date 检查,强制全量生成。 keep_temp_files: 保留临时文件,便于排查。 no_save: 不写回工程。

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_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modulesNo
no_saveNo
projectYes
ext_stepsNo
timeout_sNo
output_dirNo
report_dirNo
bsw_packageNo
wait_secondsNo
clean_generateNo
exclude_modulesNo
generation_typeNo
keep_temp_filesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it discloses meaningful non-obvious behavior: generation is slow, the call can return a job_id instead of a result, clean_generate bypasses up-to-date checks, output_dir overrides without mutating project settings, and no_save suppresses write-back. It stops short of describing the success return shape, error/failure behavior, or what permissions the BSW package directory requires.

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 its async caveat before the argument list, with no filler sentences. The Args block is compact and scannable despite 13 parameters. A minor cost is that wait_seconds is discussed in prose rather than in the argument list where the reader expects it.

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 13-parameter, long-running generation tool with no annotations and no output schema, the description covers the async contract, the output/report destinations, and the write-back behavior that determine a correct call. The remaining omissions, timeout_s and the exact shape of the returned job_id versus inline result, are the only things an agent would still have to discover.

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

Parameters4/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 compensate, and it does for most of the 13 parameters, including the non-obvious 'from-project' sentinel for modules and the semantic difference between output_dir (this run only) and the persisted project settings. Gaps remain: timeout_s is never mentioned and wait_seconds only appears in prose rather than as a documented argument.

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 resource: generating C code for BSW and RTE from a .dvjson project, with the CLI equivalent '(project generate)' supplied. An agent can immediately tell this is a code-generation step rather than a config, validation, or diff operation. It does not explicitly distinguish itself from near siblings such as davinci_cfg5_generate or davinci_project_generate_swct, which keeps it from 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 concrete when-to-do-what: omitting modules generates everything, and exceeding wait_seconds returns a job_id that must be polled with davinci_job_status and then inspected via davinci_scan_output. That routing to two named siblings is exactly the guidance an agent needs for a long-running tool. It lacks an explicit exclusion rule against the other generate tools, so it is clear context without full when-not coverage.

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