Plugins inside WebCAD
Read and update model data through a scoped SDK. Validate, preview, install and share versioned JSON packages. Installed commands are available to Caddie.
API & PLUGINS
Build a model-checking plugin or connect your own app to a Live Project. Start with a working example and instructions you can give your LLM.
Package SDK v1 · Invitation-based Live API · Contract checked 15 October 2026
START HERE
Read and update model data through a scoped SDK. Validate, preview, install and share versioned JSON packages. Installed commands are available to Caddie.
Use an invitation to read project context, chat and submit allowed discipline commands. The owner must keep the Live Project open to execute commands.
No public MCP endpoint, general API keys, webhooks or full REST/OpenAPI contract. The Live API does not expose every WebCAD or plugin command.
01 / INSIDE WEBCAD
A plugin is a .webcad-plugin.json file containing metadata, permissions and JavaScript command bodies. No separate build toolchain is needed for this example.
Copy the full package contract, asynchronous SDK reference and example. Add a sentence describing what your plugin should do.
IfcWall elements and only requests elements:read.{} as parameters, and choose Preview. The returned value contains wallCount; an empty model returns zero. This query does not change the model.Download the JSON example using the link above.Await every SDK call. Use the provided model, selection, project, storage and notice/export methods. Commands have a 15-second deadline and a 1,000-effect limit. Package v1 has no direct network, DOM, filesystem, persistent event subscriptions or custom modal UI. Legacy local scripts use a different trusted runtime; use Package v1 for new shared plugins.
02 / OUTSIDE WEBCAD
Your integration calls the Live Project gateway over HTTP. It runs its own logic or LLM; these requests do not invoke Caddie or consume WebCAD AI credits. Your LLM provider may charge separately.
Includes authentication, allowed commands, polling and failure handling. Your LLM needs an HTTP tool or script runner to use it.
#agent= in the original invitation link. Keep it in secret configuration. Set the endpoint to the app's origin plus /api/live/agent, not this showcase website. For a separate API deployment, ask its operator for the gateway URL.Bash / macOS / Linux · Enter your token locally at the prompt; never paste it into this website.
export WEBCAD_AGENT_ENDPOINT='https://webcad-preview-app.web.app/api/live/agent'
read -r -s -p 'Agent token: ' WEBCAD_AGENT_TOKEN; echo
export WEBCAD_AGENT_TOKEN
node read-model.mjs
$env:WEBCAD_AGENT_ENDPOINT = 'https://webcad-preview-app.web.app/api/live/agent'
$agentSecret = Read-Host 'Agent token' -AsSecureString
$env:WEBCAD_AGENT_TOKEN = [System.Net.NetworkCredential]::new('', $agentSecret).Password
node read-model.mjsUse your invitation's app origin if it differs from this preview deployment.
Download read-model.mjs using the link above.After setting the same environment variables in Bash, this returns state without submitting a model command:
curl --fail-with-body --silent --show-error --max-time 20 \
"$WEBCAD_AGENT_ENDPOINT" \
-H "Authorization: Agent $WEBCAD_AGENT_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"op":"state"}'
An invitation grants project access. Share it only with the intended trusted integration; keep it out of source control, logs and public prompts. This documentation page never asks for or sends your credentials.
03 / CURRENT CONTRACT
POST /api/live/agent · Content-Type: application/jsonAuthorization: Agent <invitation-token>
| Operation | JSON body | Result |
|---|---|---|
| Read state | {"op":"state"} | Project context, tool schemas, chat, host status and recent commands. |
| Send chat | {"op":"message","body":"Hello"} | {"ok":true}. Send only when requested by the user. |
| Submit command | {"op":"command","id":"<UUID>","action":{"actionType":"get_model_summary"}} | status: "queued". Poll state for the actual result. |
Both roles: get_model_summary, list_levels, create_slab.
Architect adds: create_walls.
Structural Engineer adds: create_columns, create_beams.
Read argument schemas from state.tools and intersect with this role allowlist: the advertised schemas may include both disciplines. Put parameters alongside actionType inside action. The context is a bounded summary, not a complete model export.
Stored statuses are pending, claimed, completed and cancelled. Even a completed command can report failure. Pending commands older than five minutes no longer execute and may still appear pending. A claimed command without a result has an unknown outcome.
Retry carefully: retain the command UUID. Reuse it only for the exact same request. Inspect state and the model before retrying an uncertain operation; never automatically repeat a mutation with a fresh UUID. State includes only the latest 30 commands for your invitation.
04 / EVIDENCE & LIMITS
The downloadable plugin is validated with WebCAD's package validator and executed against its SDK bridge with a known model fixture. The published plugin guide is checked against Plugin Studio's instructions.
The Node.js client is tested through the real agent HTTP handler with simulated database responses, including offline hosts, failed commands, cancellation and unknown outcomes. Browser checks cover navigation, downloads and copying instructions.
These checks verify the examples and protocol handling. They do not certify a live deployment, your project's access settings or a production database round-trip. Use the read-only connection check with your own invitation before enabling writes.