registry_upsert_schema
Admin: upsert an industry's schema (its baseline): primitives with parent, layer and parameters, and connection types, by key. Changes go into a new version, published unless publish is false; sending what is already published makes no new version. Needs an admin key.
Parameters
- industrystringrequired
Taxonomy node the schema (baseline) belongs to
min 1 charmax 80 charspattern ^[a-z0-9_]+$ - primitivesobject[]optionaldefault []max 200 items
- primitives[].keystringrequiredmin 1 charmax 80 charspattern ^[a-z0-9_]+$
- primitives[].labelstringrequiredmin 1 charmax 120 chars
- primitives[].layerenumrequiredpeopleprocesssoftwaredatadecisions
- primitives[].parentstringoptional
Parent primitive key (a part of the business)
min 1 charmax 80 charspattern ^[a-z0-9_]+$ - primitives[].descriptionstringoptionalmax 2000 chars
- primitives[].sortOrdernumberoptional≥ 0≤ 10000
- primitives[].parametersobject[]optionaldefault []max 50 items
- primitives[].parameters[].keystringrequiredmin 1 charmax 80 charspattern ^[a-z0-9_]+$
- primitives[].parameters[].labelstringrequiredmin 1 charmax 120 chars
- primitives[].parameters[].typeenumoptionaldefault "text"textnumbermoneypercentbooleanenumdate
- primitives[].parameters[].unitstringoptionalmax 40 chars
- primitives[].parameters[].optionsstring[]optionalmax 50 items
- primitives[].parameters[].descriptionstringoptionalmax 2000 chars
- connectionTypesobject[]optionaldefault []max 100 items
- connectionTypes[].keystringrequiredmin 1 charmax 80 charspattern ^[a-z0-9_]+$
- connectionTypes[].labelstringrequiredmin 1 charmax 120 chars
- connectionTypes[].flowTypeenumrequiredmoneyinformationmaterialworkenergycontrol
- connectionTypes[].fromLayerenumoptionalpeopleprocesssoftwaredatadecisions
- connectionTypes[].toLayerenumoptionalpeopleprocesssoftwaredatadecisions
- connectionTypes[].descriptionstringoptionalmax 2000 chars
- notesstringoptional
What changed in this version
max 4000 chars - publishbooleanoptionaldefault true
Publish the version so new organizations map against it
Example call
Agents call tools by name; you rarely write this by hand. It is here so you can test the server from a shell or your own code.
{
"name": "registry_upsert_schema",
"arguments": {
"industry": "construction",
"primitives": [
{
"key": "winning_work",
"label": "Winning work",
"layer": "process"
},
{
"key": "estimating",
"label": "Estimating",
"layer": "process",
"parent": "winning_work",
"parameters": [
{
"key": "estimating_method",
"label": "Estimating method",
"type": "enum",
"options": [
"spreadsheet",
"estimating software",
"outsourced"
]
}
]
}
],
"connectionTypes": [
{
"key": "quote_handoff",
"label": "Quote hand-off",
"flowType": "information"
}
]
}
}Response
The result is one text content block holding this JSON (abbreviated here). Errors come back with isError: true and a message such as Error 401: … or Invalid input: ….
{
"industry": {
"key": "construction",
"name": "Construction"
},
"version": 4,
"status": "published",
"changed": true,
"results": [
{
"kind": "primitive",
"key": "winning_work",
"status": "unchanged"
},
{
"kind": "primitive",
"key": "estimating",
"status": "updated"
},
{
"kind": "parameter",
"key": "estimating.estimating_method",
"status": "created"
},
{
"kind": "connectionType",
"key": "quote_handoff",
"status": "unchanged"
}
]
}Over REST
The same call without MCP: POST/api/v1/admin/registry/schemas