Tools / object_import
object_import
Draft objects from local OpenAPI, JSON Schema, Postgres SQL, Prisma, dbt, OData or GraphQL files, then apply accepted proposals.
Generated from @oods/foundry 0.19.0
One of the 26 tools your assistant sees by default.
Use it when importing a schema; use object_import_read to review a staged object. Returns importId, staged files, proposal counts and re-import differences, or batch registration results. draft takes source.path or source.content; apply requires explicit objects and proposal ids. overwrite replaces team objects; confirmShipped names approved shipped replacements. No network fetch or code execution. Full schema: oods://schemas/object_import.input.json.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
action | "draft" | "apply" | yes | Choose draft, apply. |
source | object | no | Local file/folder or inline schema. Used only by draft. |
importId | string | no | Content-addressed import id from draft. Required by show and apply. |
objects | object[] | no | Explicit accepted object names and optional proposal ids for apply. |
overwrite | boolean | no | Allow replacing existing team objects. |
confirmShipped | string[] | no | Each shipped object name whose replacement is explicitly confirmed. |
Outputs: draft
| Name | Type | Required | Description |
|---|---|---|---|
action | "draft" | yes | |
importId | string | yes | |
directory | string | yes | |
contentHash | string | yes | |
counts | object | yes | |
objectCount | integer | yes | |
objects | string[] | yes | |
objectsTruncated | boolean | yes | |
shippedClashes | string[] | yes | |
diff | object | yes | |
proposalGrades | object | yes | |
cycleCount | integer | yes | |
files | object | yes | |
proposalTraits | object | no |
Outputs: show
| Name | Type | Required | Description |
|---|---|---|---|
action | "show" | yes | |
importId | string | yes | |
name | string | yes | |
yaml | string | yes | |
proposals | object[] | yes | |
unmapped | object[] | yes | |
diff | object | yes |
Outputs: apply
| Name | Type | Required | Description |
|---|---|---|---|
action | "apply" | yes | |
importId | string | yes | |
count | integer | yes | |
applied | object[] | yes |
A real call
Recorded by this site's tools run, step object-import-draft, with the published OODS Foundry
0.19.0.
Its input:
{
"action": "draft",
"source": {
"path": "<workspace>/object-import/petstore.yaml"
}
} Its result:
{
"action": "draft",
"importId": "import-9b81d91c8453593c6acffa0af9d2d7ac36590eeb9230fe43200055cf1cc1628c",
"directory": "~/.oods-foundry/imports/import-9b81d91c8453593c6acffa0af9d2d7ac36590eeb9230fe43200055cf1cc1628c",
"contentHash": "sha256:380789f6757c66ca7a800f731767211ec663da702a3e851aef3980557bbef246",
"counts": {
"total": 55,
"mapped": 32,
"proposed": 0,
"unmapped": 23,
"fields": 5,
"mappedFields": 5
},
"objectCount": 7,
"objects": [
"Error",
"Operation27023d0e7d",
"Operation4d740bf4c2",
"Operation4deff75316",
"Operation68547e2036",
"Operationc343d75736",
"Pet"
],
"objectsTruncated": false,
"shippedClashes": [],
"diff": {
"new": 7,
"changed": 0,
"unchanged": 0,
"file": "~/.oods-foundry/imports/import-9b81d91c8453593c6acffa0af9d2d7ac36590eeb9230fe43200055cf1cc1628c/diff.json"
},
"proposalTraits": {},
"proposalGrades": {
"strong": 0,
"medium": 0,
"weak": 0
},
"cycleCount": 0,
"files": {
"hub": "hub.json",
"report": "report.json",
"order": "order.json",
"objects": "objects/"
}
}