The MCP tools take documents as filesystem paths, or (for some) as raw JSON. Neither form lets a remote caller supply a document's dependencies, so an HTTP-bound server cannot validate a realistic OO-LD schema.
Why one document is not enough
OO-LD schemas are relative-sibling-heavy by design: @context entries and $ref targets are usually files next to the schema. _materialise() in src/oold/validation/mcp_server.py says so itself:
A schema passed as raw JSON therefore has to be written somewhere before it can be validated, and it will only resolve if it has no relative references.
So inline JSON works for a self-contained document and fails for anything that references a sibling, which is most real schemas.
Options
- Bundle parameter: accept a map of filename to document, materialise all of them into one temporary directory, and validate the named entry. Covers relative siblings with no network access.
- Base URL: accept a base the resolver fetches relatives from. Reuses the existing remote resolution and cache, but requires network and makes results depend on a remote host.
The bundle form is likely the better default; the two are not exclusive.
Out of scope here
validate_oold_directory and run_oold_compliance take directories and are inherently filesystem-bound. A remote equivalent would be a bundle of many documents, which is the same design question.
Already done
Inline JSON is accepted consistently by the four single-document tools (validate_oold_schema, validate_oold_instance, generate_oold_instance, check_context_mapping). This issue is only about dependencies.
Raised from review of #114 (#114 (comment)).
The MCP tools take documents as filesystem paths, or (for some) as raw JSON. Neither form lets a remote caller supply a document's dependencies, so an HTTP-bound server cannot validate a realistic OO-LD schema.
Why one document is not enough
OO-LD schemas are relative-sibling-heavy by design:
@contextentries and$reftargets are usually files next to the schema._materialise()insrc/oold/validation/mcp_server.pysays so itself:So inline JSON works for a self-contained document and fails for anything that references a sibling, which is most real schemas.
Options
The bundle form is likely the better default; the two are not exclusive.
Out of scope here
validate_oold_directoryandrun_oold_compliancetake directories and are inherently filesystem-bound. A remote equivalent would be a bundle of many documents, which is the same design question.Already done
Inline JSON is accepted consistently by the four single-document tools (
validate_oold_schema,validate_oold_instance,generate_oold_instance,check_context_mapping). This issue is only about dependencies.Raised from review of #114 (#114 (comment)).