feat(mcp): expose entity creation schemas on demand

Expose creation fields, constraints and examples for the 11 supported types without expanding startup tool schemas. Share the creation contract and constructor with execution to keep accepted inputs consistent.

Validation: MCP, contract/factory and entity creation regression tests.
This commit is contained in:
Karim Jerbi committed 2026-10-13 09:33:49 +01:00
1 parent a5435a6df6
commit 97afb57333
10 files changed
+1118 -488

No files matched your search

+9
View File
@@ -135,6 +135,15 @@ def legacy(server: Path) -> None:
assert not guide_tool["result"].get("isError"), guide_tool
assert guide_tool["result"]["structuredContent"]["ok"] is True
assert "resource_link" in guide_tool["result"]["structuredContent"]["contents"][0]["text"]
entity_schema = request(process, {
"jsonrpc": "2.0", "id": "entity-schema", "method": "tools/call",
"params": {"name": "ocs_read", "arguments": {
"op": "entity_schema", "parameters": {"type": "Circle"},
}},
})
assert not entity_schema["result"].get("isError"), entity_schema
contract = entity_schema["result"]["structuredContent"]["schema"]
assert contract["required"] == ["type", "center", "radius"]
close(process)