CLI command
seo schema
Structured data: the properties each schema.org type must state, as the documentation the operator names requires them, and a stored crawl's JSON-LD checked against them.
Invocation#
echo-cli seo schema require --type <@type> --properties <name,name…> --source <documentation url> --by <who> | list | unrequire --type <@type> | check --crawl <crawl-id>Inputs and output#
require and unrequire write the requirement: type, properties, source, declared_by and declared_at; list writes { requirements } by type. check writes crawl, pages, items (how many JSON-LD items the pages carry) and findings: url, problem, type and missing, for every block that is not JSON, every item that states no @type, and every item of a required type lacking properties, which missing names. check exits 1 when findings is not empty.
State effect#
Every verb calls Echo Web's authenticated /api/seo/schema with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Structured data section of the GEO screen and of Echo Desktop's GEO screen call the same operations, and echo-mcp runs them as echo_schema_require, echo_schema_requirements, echo_schema_unrequire and echo_schema_check. schema.org requires no property itself; search engines do, per type and feature, so the requirement names the page requiring it. seo crawl run stores each page's <script type="application/ld+json"> blocks as JSON-LD 1.1 embeds them, a block's items being its object, its array's members and its @graph's members. Requirements are kept in seo_schema_requirements, one per type. A published blog post's public payload, /api/public/blog/<surface>/<slug>, answers jsonLd, the post's schema.org BlogPosting — headline, description, keywords, url, mainEntityOfPage, datePublished, dateModified and the surface as publisher — for its landing to embed.
Refusals#
- A wrong invocation is refused before anything is sent: "seo schema takes <every verb's usage, separated by semicolons>; got <word>", "seo schema <verb> does not take <flag>; it takes …", "<flag> needs a value" and "seo schema <verb> needs <flag>".
- Echo Web answers a bad request with "type is required: the schema.org @type the requirement applies to, such as Article", "properties is required: the properties an item of the type must state", "source is required: the address of the documentation requiring the properties; got <value>", "declared_by is required: who declares the requirement" or "type is required: the @type whose requirement to remove"; not found with "no requirement is declared for <type>; echo-cli seo schema list lists them" or "no crawl has id <id>; echo-cli seo crawl list lists them"; and fails naming the cause with "the requirement of <type> could not be stored: <cause>". The command prints Echo Web's sentence and exits 1.