Review and apply AI plans
Save an AI-generated API proposal, review its endpoints and authentication, and apply it to create drafts. Publishing remains a separate step.
Preview: these commands require a compatible CLI build and Elva service support. Check elva --version and each command's --help output. Your installed release may not include every command shown here.
Plan an MCP from a repository
elva --yes mcp plan --repo acme/backend --sync \
--prompt "Customers can view their own orders and track shipments. No writes. Exclude internal notes." \
--auth-type bearer --out customer-mcp.plan.json
Link GitHub in Elva first and replace acme/backend with your repository. --sync connects or rescans the repository and can update collections before planning. Without --sync, planning uses the last completed scan. To plan from existing collections, use --source COLLECTION_ID, repeated for multiple sources. Supply --api-base-url if a usable upstream URL cannot be inferred.
Review the saved plan
Inspect review.contract, review.openapi, review.mcpAuth, sources, messages, and blockers. Confirm the audience, allowed operations and fields, server URL, and upstream authentication. The audience label does not enforce customer or tenant access; your API must enforce those permissions.
Treat the plan as an immutable review artifact. Do not edit the plan file; request a new plan when the proposal needs changes. Store files carefully because descriptions, schemas, and examples can contain sensitive API information. Output files are not silently overwritten.
elva --yes apply customer-mcp.plan.json
elva --json contract show CONTRACT_ID
Replace CONTRACT_ID with the returned ID. Apply creates a draft contract and MCP. Bearer is the default authentication for this planning flow; use api_key with --api-key-header when required, or choose none explicitly for an intentionally public upstream.
Plan contract edits
elva contract create --source COLLECTION_ID \
--prompt "A partner orders API with read-only operations" \
--plan --out partner.plan.json
elva contract update "Customer API" \
--prompt "Exclude internalNotes from the selected responses" \
--plan --out fields.plan.json
elva contract update "Customer API" --mode compose \
--prompt "Add shipment lookup and keep the existing order endpoints" \
--plan --out endpoints.plan.json
The default Schema mode preserves endpoint selection. Compose changes the selected operations. --plan or --out saves a review without applying it. --yes accepts the requested draft action; it does not publish the contract.
Recover an interrupted request
elva --json plan show JOB_ID --out recovered.plan.json
elva --yes apply recovered.plan.json
Keep the job ID printed while planning. Completed plans remain available for seven days; unfinished plans expire after 15 minutes. If the source, workspace, user, or contract revision no longer matches the review, generate and review a new plan. Retrying the same valid apply can resume partial work with stable resource IDs.
A returned apply receipt describes the completed action, so inspect the current resources before assuming their state is unchanged. For command schemas and supported options, use elva --json schema.
Publish the reviewed contract
elva --yes contract publish CONTRACT_ID
Complete required approvals first and acknowledge breaking changes only after review. Publish contract-generated MCPs through their parent contract. Publication reuses the draft configuration; public artifact sharing remains disabled unless you enable it.
On this page
- Review and apply AI plans