From db56690f481d48a667ba06492f56ec3a87511186 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 9 Nov 2026 18:19:24 -0800 Subject: [PATCH] MCP: docs list every JSON Schema keyword in a command's schema The Parameter schemas section of docs/mcp.md now names every keyword ParamSchema::to_json writes: $schema, description and deprecated at the root, items for lists, prefixItems, items: false and minItems for a point, anyOf and minItems for a color, and description, default and deprecated on a parameter. --- docs/mcp.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index 66459255a..b12a00365 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1387,9 +1387,13 @@ vectorcraft-cli run --cmd file.new --params '{"width":600,"height":200}' --cmd Some commands have a machine-readable parameter schema: at present `view.capsLock`, `view.saved.new`, `view.saved.edit`, `view.saved.list`, `view.transparencyGrid` and `view.snapToGlyph.options`. The engine's `engine.commands` list gives such a command a `schema` field: an object schema in the shape of JSON Schema 2020-12 -(https://json-schema.org/draft/2020-12), with `type`, `properties`, `required`, `additionalProperties: false`, -`minimum`, `maximum`, `exclusiveMinimum` and `exclusiveMaximum` for ranges, `enum`, and `default` for a default the engine fills in. VectorCraft's own -fields are `x-since` (the API level that added the command or the parameter), `x-deprecatedSince`, `x-lenient`, +(https://json-schema.org/draft/2020-12). Its root has `$schema` (the 2020-12 dialect), `description` when the +command has a summary, and `deprecated: true` when the command is deprecated. The schema uses `type`, `properties`, `required` and +`additionalProperties: false` for objects; `minimum`, `maximum`, `exclusiveMinimum` and `exclusiveMaximum` for ranges; +`enum` for a list of names; `items` for the values of a list; `prefixItems`, `items: false` and `minItems: 2` for a +point; `anyOf` and `minItems: 3` for a color, which is a string, a list of at least three numbers or an object; +`description` for a parameter's doc text; `default` for a default the engine fills in; and `deprecated: true` for a +deprecated parameter. VectorCraft's own fields are `x-since` (the API level that added the command or the parameter), `x-deprecatedSince`, `x-lenient`, `x-unit`, `x-kind` (`id`, `color` or `point`), `x-default` (a default the command works out, such as `toggle`), `x-cost`, `x-writes` (`nothing`, `session`, `preferences` or `document`) and `x-returns`. A parameter that reads null as left out is an `anyOf` with `{"type": "null"}`. Null params read as `{}`, so a schema with no required parameter has