generate_ma2_macro
Builds grandMA2 macros from plain-English intent, returning XML, lint, and expert review; optionally stores to a pool slot only with destructive-action confirmation.
Instructions
Generate an MA2 macro from natural-language intent (SAFE_READ when store=False).
Returns ``body_xml`` + lint + expert review. When ``store=True``, the tool
requires ``confirm_destructive=True`` AND ``pool_id``; in Path A the store
branch returns blocked / deferred-to-Path-B rather than mutating the pool.
Args:
intent: Plain-English description of the macro to build.
scope_hints: Optional dict of routing hints, e.g. ``{"executor": "1.1.1"}``.
store: When True, store the generated macro to the macro pool.
pool_id: Target pool slot (required if ``store=True``).
confirm_destructive: Required if ``store=True`` (the store path is destructive).
Returns:
JSON envelope:
``{intent, body_xml, line_count, validation, lint, expert_review,
stored_as, blocked}``.
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": {
"intent": "<intent>"
},
"name": "generate_ma2_macro"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| store | No | ||
| intent | Yes | ||
| pool_id | No | ||
| scope_hints | No | ||
| confirm_destructive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |