Search documentation

Search documentation

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.

codestringrequired

Norm code, e.g. "SIA 261".

resultobject

Existence 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.

codestringrequired

Norm code, e.g. "SIA 261".

yearnumberrequired

Publication year.

titlestringrequired

Full title of the norm.

languagestringrequired

One of "fr", "de", "it", "en".

totalPagesnumberrequired

Total page count of the source PDF.

documentIdstring

The 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.

documentIdstringrequired

The id from ingest_create_document.

sectionsarrayrequired

Array of section objects. Each section has:

section object
nodeIdstringrequired

Stable unique id within the document (e.g. "s-4-2-1").

parentNodeIdstring

nodeId of the parent section; omit for roots.

pathstringrequired

Human path, e.g. "4.2.1" or "Annexe B.1".

titlestringrequired
Section title.
summarystringrequired

1 to 3 sentence summary used for tree navigation.

depthnumberrequired

0 = chapter, 1 = section, etc.

contentstringrequired

Full enriched text (LaTeX formulas inline OK).

rawContentstringrequired
Raw extracted text.
pageStartnumberrequired
First page of the section.
pageEndnumberrequired
Last page of the section.
orderIndexnumberrequired

Ordering within the parent.

sectionsobject

A map of nodeId → sectionId.


ingest_attach_formula

Attaches a LaTeX formula to a section.

sectionIdstringrequired

Target section id.

latexstringrequired

The formula in LaTeX.

descriptionstringrequired

What the formula computes.

formulaNumberstringrequired

The formula's number/label as printed.

formulaIdstring

The new formula's id.


ingest_attach_table

Attaches a structured table to a section.

sectionIdstringrequired
Target section id.
dataobjectrequired

{ headers: string[], rows: string[][] }.

captionstringrequired
Table caption.
tableNumberstringrequired
The table's number/label.
tableIdstring

The new table's id.


ingest_attach_cross_ref

Attaches a cross-reference from a section to another norm or section.

sourceSectionIdstringrequired

The section the reference is from.

targetDocumentCodestringrequired

Target norm code, e.g. "SIA 263".

targetSectionPathstring

Optional target section path in the other norm.

refTextstringrequired

The reference text as written.

refTypestringrequired

Either "explicit" or "implicit".

crossRefIdstring

The new cross-reference's id.


ingest_upload_figure

Uploads a figure image (base64) and attaches it to a section, in one call.

sectionIdstringrequired

Target section id.

base64stringrequired

Base64-encoded image bytes (a data: prefix is tolerated).

mimeTypestringrequired

One of "image/png", "image/jpeg", "image/webp". Max 8 MB.

captionstringrequired

Figure caption.

figureNumberstringrequired

The figure's number/label.

figureIdstring

The 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.

documentIdstringrequired

The document to scan.

resultobject

A 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).

documentIdstringrequired

The document to publish.

forceboolean

Publish even below the floor. Only when the document really is that short, and the person confirmed it.

publishedboolean

true on success.

qualityobject

The 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.

documentIdstringrequired

The document to delete.

deletedboolean

true on success.

Deletion is permanent and removes all child content. Make sure you target the right documentId.