Andrus Adamchik created CAY-2942:
------------------------------------

             Summary: CayenneModeler MCP: cgen_run tool
                 Key: CAY-2942
                 URL: https://issues.apache.org/jira/browse/CAY-2942
             Project: Cayenne
          Issue Type: Task
            Reporter: Andrus Adamchik
            Assignee: Andrus Adamchik
             Fix For: 5.0-M2


Add a new {{cgen_run}} tool to the CayenneModeler MCP server (on top of 
CAY-2936 scaffolding) that runs Cayenne's class generator for a single DataMap, 
using the {{cgen}} config already stored in the DataMap XML. Inputs are an 
absolute {{projectPath}} to the top-level {{cayenne-*.xml}} and a {{dataMap}} 
symbolic name. The tool reports only the runtime delta — what cgen did on disk 
— since the agent can read config from XML on its own.

Validation runs in fixed order and short-circuits: project readable, parses, 
DataMap present, cgen config present, destDir specified, destDir writable. The 
response envelope is always the same shape: {{status}} ({{{}generated{}}}, 
{{{}up_to_date{}}}, {{{}validation_failed{}}}, {{{}error{}}}), {{summary}} with 
filesConsidered/filesWritten, a {{files}} array of written files (each with 
server-classified {{kind}} and {{{}sourceEntity{}}}), {{{}resolved.destDir{}}}, 
captured warnings, a per-step {{validation}} block, and an {{error}} object 
with a stable code enum.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to