Compile and preview CharmIQ Applications from your existing tools — VS Code, Claude Code, or any MCP client.
|
|
srcdoc.https://api.charmiq.ai/mcp/applicationbuild_from_content | |
build_from_uri |
type ApplicationBuildArtifact = { contentType: string; content: string; cacheMaxAge?: number; trust?: unknown; manifest?: Record<string, unknown>; consumedFilePaths?: string[]; consumedVersions?: Record<string, number>; };
content is the rendered artifact. Write it to disk for local preview, or assign it to an iframe srcdoc inside an Application.build_from_content{ "manifest": { "id": "counter", "name": "Counter", "bundle": { "entry": { "html": "/index.html", "script": "/src/main.tsx" }, "format": "esm" } }, "files": [ { "path": "/index.html", "content": "<div id=\"root\"></div>" }, { "path": "/src/main.tsx", "content": "document.getElementById('root').textContent = 'Hello';" } ] }
bundle.mounts is not read from server disk; flatten mounted files into the submitted file set.build_from_urimanifest.json, or at an Application document.{ "uri": "charmiq://folder/abc123" }
charmiq:// URIs.build_from_uri.build_from_content for local preview. The caller writes content to disk.build_from_uri for CharmIQ-hosted source. Permissions, cache, trust, and staleness follow the normal Application pipeline.structuredContent. The text response mirrors content, but scripts should read the structured artifact.build_from_uri consumes.