Skip to main content
Glama

davinci_cfg5_generate

Generates code for DaVinci Configurator 5 .dpa projects, targeting all or selected AUTOSAR modules with optional exclusions, save-back, and background polling for long runs.

Instructions

用 DaVinci Configurator 5 生成代码(DVCfgCmd -p ... -g)。

不传 modules 时生成全部生成器。生成通常较慢:超过 wait_seconds 会转后台, 用 davinci_job_status 轮询。

Args: project: .dpa 工程文件。 modules: 模块短名或 /MICROSAR/... 定义路径;缺省全部。 exclude_modules: 排除的模块。 generation_type: REAL 或 VTT。 ext_steps: 外部生成步骤,逗号分隔;"from-project" 表示按工程设置。 swcs: --swcsToGenerate 的值(None 表示不传该选项)。 gen_args: 每个元素对应一个 --genArg,例如 "Rte:DoSomething=true"。 save_project: 是否加 --saveProject,把生成期间的变化写回 .dpa。 keep_temp_files: 保留生成临时文件。 report_dir: 报告目录;缺省 <工程>/Log/davinci-mcp。

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

Input Schema

NameRequiredDescriptionDefault
swcsNo
modulesNo
projectYes
gen_argsNo
ext_stepsNo
timeout_sNo
report_dirNo
save_projectNo
wait_secondsNo
exclude_modulesNo
generation_typeNo
keep_temp_filesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it warns that generation is slow, explains the background transition and polling escape hatch, discloses that save_project writes generation-time changes back into the .dpa, and notes keep_temp_files retains temp artifacts. It stops short of covering failure modes, permissions, or what a call returns.

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 the background/polling caveat, then organized as a clean per-argument list that is justified given the 0% schema coverage. A few lines are near-redundant with parameter names, but nothing is filler at this complexity.

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 12-parameter mutation tool with no annotations and no output schema, the definition covers scope defaults, background behavior, polling, and most argument semantics. The remaining gaps — what timeout_s controls versus wait_seconds, and what result the caller gets back — are real but narrow.

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 define the 12 parameters itself, and it documents ten of them meaningfully — including non-obvious ones like gen_args mapping to repeated --genArg entries, ext_steps with the sentinel value 'from-project', swcs vs modules, and the report_dir default path. timeout_s and wait_seconds (beyond the prose mention) are left undefined, and the interaction between the two is not explained.

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 — generate code with DaVinci Configurator 5 — and even names the underlying CLI (DVCfgCmd -p ... -g), so the agent knows exactly what happens. It does not, however, distinguish this from sibling generators such as davinci_project_generate or davinci_cfg5_run, which the agent must disambiguate on its own.

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?

Implied usage is clear (build/generate a project) and it gives one concrete routing rule: if generation exceeds wait_seconds it goes to the background, so poll with davinci_job_status. It also states the default scope when modules is omitted. But it never says when to prefer this over the sibling generate/run tools, and gives no exclusion guidance.

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