Skip to contents

Returns the bundled JSON Schema (Draft 2020-12) describing a serializable vellumplot spec — the input contract for spec_from_json() and the MCP render_spec / get_schema tools. An agent can validate a generated spec against it before rendering.

Usage

spec_schema(as = c("string", "list", "path"))

Arguments

as

A character scalar: "string" (raw JSON, the default), "list" (parsed R list), or "path" (the file path in the installed package).

Value

The schema as a string, a list, or a file path.

Examples

schema <- spec_schema(as = "list")
schema$title
#> [1] "vellumplot spec (v1)"