Skip to main content
Glama

Plecs Codegen

plecs_codegen

Generates code from PLECS models using PLECS Coder and reports diagnostics; requires a PLECS Coder licence.

Instructions

Generate code with PLECS Coder (requires a PLECS Coder licence).

Verified on 5.0.6: plecs.codegen runs and streams Coder diagnostics back as an RPC error ("Code generation error: ..."), which is surfaced verbatim. A model with blocks that are ignored during code generation (e.g. Small Signal Response) fails instead of producing partial artifacts.

Input Schema

NameRequiredDescriptionDefault
pathYes
optionsNo
output_dirNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.3/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses the licence prerequisite, explains that Coder diagnostics are surfaced verbatim as an RPC error, and warns that models with ignored blocks fail rather than producing partial artifacts. It does not describe file output behavior or the effect of options/output_dir, but the failure-mode disclosure is genuinely useful.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the core action, and every sentence adds value: licence requirement, diagnostic streaming behavior, and failure semantics. There is no redundant restatement of structured fields.

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 explained. However, for a codegen tool with 0% parameter description coverage and no usage routing against siblings, the definition is only minimally complete: it handles failure behavior well but leaves parameter meaning and alternative-tool selection underspecified.

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

Parameters2/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 explain path, options, and output_dir. It only implicitly suggests that path identifies the model; options and output_dir remain undefined in both schema and description.

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 states a specific verb and resource: "Generate code with PLECS Coder." It is clear what the tool does, but it does not explicitly distinguish itself from related siblings such as plecs_export_fmu, plecs_simulate, or plecs_validate.

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

Usage Guidelines2/5

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

The only usage condition given is the PLECS Coder licence requirement. It does not say when to choose this over alternatives like plecs_export_fmu, or when code generation should not be used.

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