Ingestion tools
The 10 ingest_* tools that write norms into your workspace, used by the ingest-norm skill.
These tools let your agent add a document you hold the rights to in your workspace. They're driven by the
ingest-norm skill. You don't call them by hand. They are served on
both transports, the remote connector and the local server. Every call is authenticated (connector
token or API key) and scoped server-side to your organization; the writes need the owner or admin
role, ingest_status is open to every member. All ids are returned as strings.
Only ingest norms your organization holds a valid licence for. See the Terms.
The typical order: ingest_status → ingest_create_document → ingest_create_sections →
enrich (ingest_attach_*, ingest_upload_figure) → ingest_normalize_cross_refs →
ingest_publish.
ingest_status
Checks whether a norm (by code) already exists in your workspace and how many sections it has. Call before creating to avoid duplicates.
codestringrequiredNorm code, e.g. "SIA 261".
resultobjectExistence status, section count and the coverage score (quality: score
0-100, characters per page, share of pages under a chapter, flags) for the
code in your workspace.
ingest_create_document
Creates a draft norm document in your workspace. Returns the documentId used by every
subsequent ingest_* call.
codestringrequiredNorm code, e.g. "SIA 261".
yearnumberrequiredPublication year.
titlestringrequiredFull title of the norm.
languagestringrequiredOne of "fr", "de", "it", "en".
totalPagesnumberrequiredTotal page count of the source PDF.
documentIdstringThe new document's id.
ingest_create_sections
Bulk-inserts sections into a draft document. Parent links resolve via parentNodeId within the
batch and already-inserted sections. Returns a map from nodeId to the stored sectionId. Use
those ids to attach formulas, tables, figures, and cross-references.
documentIdstringrequiredThe id from ingest_create_document.
sectionsarrayrequiredArray of section objects. Each section has:
section object
nodeIdstringrequiredStable unique id within the document (e.g. "s-4-2-1").
parentNodeIdstringnodeId of the parent section; omit for roots.
pathstringrequiredHuman path, e.g. "4.2.1" or "Annexe B.1".
titlestringrequiredsummarystringrequired1 to 3 sentence summary used for tree navigation.
depthnumberrequired0 = chapter, 1 = section, etc.
contentstringrequiredFull enriched text (LaTeX formulas inline OK).
rawContentstringrequiredpageStartnumberrequiredpageEndnumberrequiredorderIndexnumberrequiredOrdering within the parent.
sectionsobjectA map of nodeId → sectionId.
ingest_attach_formula
Attaches a LaTeX formula to a section.
sectionIdstringrequiredTarget section id.
latexstringrequiredThe formula in LaTeX.
descriptionstringrequiredWhat the formula computes.
formulaNumberstringrequiredThe formula's number/label as printed.
formulaIdstringThe new formula's id.
ingest_attach_table
Attaches a structured table to a section.
sectionIdstringrequireddataobjectrequired{ headers: string[], rows: string[][] }.
captionstringrequiredtableNumberstringrequiredtableIdstringThe new table's id.
ingest_attach_cross_ref
Attaches a cross-reference from a section to another norm or section.
sourceSectionIdstringrequiredThe section the reference is from.
targetDocumentCodestringrequiredTarget norm code, e.g. "SIA 263".
targetSectionPathstringOptional target section path in the other norm.
refTextstringrequiredThe reference text as written.
refTypestringrequiredEither "explicit" or "implicit".
crossRefIdstringThe new cross-reference's id.
ingest_upload_figure
Uploads a figure image (base64) and attaches it to a section, in one call.
sectionIdstringrequiredTarget section id.
base64stringrequiredBase64-encoded image bytes (a data: prefix is tolerated).
mimeTypestringrequiredOne of "image/png", "image/jpeg", "image/webp". Max 8 MB.
captionstringrequiredFigure caption.
figureNumberstringrequiredThe figure's number/label.
figureIdstringThe new figure's id.
ingest_normalize_cross_refs
Scans every section of a document and (re)builds cross-references to other norms detected in the text (SIA, SN EN, EN, ISO, DIN…). Idempotent. Safe to run repeatedly.
documentIdstringrequiredThe document to scan.
resultobjectA summary of the cross-references found and rebuilt.
ingest_publish
Publishes a draft document so it becomes queryable via the read tools in your workspace.
Before publishing, the server scores how much of the norm actually made it in:
characters of text per page, share of pages under a chapter, empty leaves,
attached formulas and tables. A document scoring below 30/100 is refused with
the reasons (QUALITY_TOO_LOW): an agent reading it would answer from
summaries. The score is stored either way and reported by list_norms as
coverage (full, partial or sparse).
documentIdstringrequiredThe document to publish.
forcebooleanPublish even below the floor. Only when the document really is that short, and the person confirmed it.
publishedbooleantrue on success.
qualityobjectThe stored score: score, charsPerPage, pagesCovered, sectionCount,
leafCount, emptyLeaves, formulas, tables, figures, crossRefs,
flags.
ingest_delete
Deletes a document and all its sections, figures, tables, formulas, and cross-references. Use before re-ingesting.
documentIdstringrequiredThe document to delete.
deletedbooleantrue on success.
Deletion is permanent and removes all child content. Make sure you target the
right documentId.