> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stratta.ch/llms.txt
> Use this file to discover all available pages before exploring further.

# Ingestion tools

> The 10 ingest_* tools that write norms into your workspace — used by the ingest-norm skill.

These tools let Claude add a norm you're licensed for to your workspace. They're driven by the
[`ingest-norm` skill](/en/guides/ingest-a-norm) — you don't call them by hand. Every call is
authenticated by your API key and scoped server-side to your organization. All ids are returned
as strings.

<Warning>
  Only ingest norms your organization holds a valid licence for. See the
  [Terms](https://stratta.ch/legal/terms).
</Warning>

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.

<ParamField path="code" type="string" required>
  Norm code, e.g. `"SIA 261"`.
</ParamField>

<ResponseField name="result" type="object">
  Existence status and section count for the code in your workspace.
</ResponseField>

***

## ingest\_create\_document

Creates a draft norm document in your workspace. Returns the `documentId` used by every
subsequent `ingest_*` call.

<ParamField path="code" type="string" required>Norm code, e.g. `"SIA 261"`.</ParamField>
<ParamField path="year" type="number" required>Publication year.</ParamField>
<ParamField path="title" type="string" required>Full title of the norm.</ParamField>

<ParamField path="language" type="string" required>
  One of `"fr"`, `"de"`, `"it"`, `"en"`.
</ParamField>

<ParamField path="totalPages" type="number" required>Total page count of the source PDF.</ParamField>

<ResponseField name="documentId" type="string">
  The new document's id.
</ResponseField>

***

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

<ParamField path="documentId" type="string" required>
  The id from `ingest_create_document`.
</ParamField>

<ParamField path="sections" type="array" required>
  Array of section objects. Each section has:

  <Expandable title="section object">
    <ParamField path="nodeId" type="string" required>
      Stable unique id within the document (e.g. `"s-4-2-1"`).
    </ParamField>

    <ParamField path="parentNodeId" type="string">
      `nodeId` of the parent section; omit for roots.
    </ParamField>

    <ParamField path="path" type="string" required>
      Human path, e.g. `"4.2.1"` or `"Annexe B.1"`.
    </ParamField>

    <ParamField path="title" type="string" required>Section title.</ParamField>

    <ParamField path="summary" type="string" required>
      1–3 sentence summary used for tree navigation.
    </ParamField>

    <ParamField path="depth" type="number" required>
      `0` = chapter, `1` = section, etc.
    </ParamField>

    <ParamField path="content" type="string" required>
      Full enriched text (LaTeX formulas inline OK).
    </ParamField>

    <ParamField path="rawContent" type="string" required>Raw extracted text.</ParamField>
    <ParamField path="pageStart" type="number" required>First page of the section.</ParamField>
    <ParamField path="pageEnd" type="number" required>Last page of the section.</ParamField>

    <ParamField path="orderIndex" type="number" required>
      Ordering within the parent.
    </ParamField>
  </Expandable>
</ParamField>

<ResponseField name="sections" type="object">
  A map of `nodeId` → `sectionId`.
</ResponseField>

***

## ingest\_attach\_formula

Attaches a LaTeX formula to a section.

<ParamField path="sectionId" type="string" required>Target section id.</ParamField>
<ParamField path="latex" type="string" required>The formula in LaTeX.</ParamField>
<ParamField path="description" type="string" required>What the formula computes.</ParamField>

<ParamField path="formulaNumber" type="string" required>
  The formula's number/label as printed.
</ParamField>

<ResponseField name="formulaId" type="string">The new formula's id.</ResponseField>

***

## ingest\_attach\_table

Attaches a structured table to a section.

<ParamField path="sectionId" type="string" required>Target section id.</ParamField>

<ParamField path="data" type="object" required>
  `{ headers: string[], rows: string[][] }`.
</ParamField>

<ParamField path="caption" type="string" required>Table caption.</ParamField>
<ParamField path="tableNumber" type="string" required>The table's number/label.</ParamField>

<ResponseField name="tableId" type="string">The new table's id.</ResponseField>

***

## ingest\_attach\_cross\_ref

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

<ParamField path="sourceSectionId" type="string" required>The section the reference is from.</ParamField>

<ParamField path="targetDocumentCode" type="string" required>
  Target norm code, e.g. `"SIA 263"`.
</ParamField>

<ParamField path="targetSectionPath" type="string">
  Optional target section path in the other norm.
</ParamField>

<ParamField path="refText" type="string" required>The reference text as written.</ParamField>

<ParamField path="refType" type="string" required>
  Either `"explicit"` or `"implicit"`.
</ParamField>

<ResponseField name="crossRefId" type="string">The new cross-reference's id.</ResponseField>

***

## ingest\_upload\_figure

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

<ParamField path="sectionId" type="string" required>Target section id.</ParamField>

<ParamField path="base64" type="string" required>
  Base64-encoded image bytes (a `data:` prefix is tolerated).
</ParamField>

<ParamField path="mimeType" type="string" required>
  One of `"image/png"`, `"image/jpeg"`, `"image/webp"`. Max 8 MB.
</ParamField>

<ParamField path="caption" type="string" required>Figure caption.</ParamField>
<ParamField path="figureNumber" type="string" required>The figure's number/label.</ParamField>

<ResponseField name="figureId" type="string">The new figure's id.</ResponseField>

***

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

<ParamField path="documentId" type="string" required>The document to scan.</ParamField>

<ResponseField name="result" type="object">
  A summary of the cross-references found and rebuilt.
</ResponseField>

***

## ingest\_publish

Publishes a draft document so it becomes queryable via the [read tools](/en/mcp/read-tools) in
your workspace.

<ParamField path="documentId" type="string" required>The document to publish.</ParamField>

<ResponseField name="published" type="boolean">`true` on success.</ResponseField>

***

## ingest\_delete

Deletes a document and all its sections, figures, tables, formulas, and cross-references. Use
before re-ingesting.

<ParamField path="documentId" type="string" required>The document to delete.</ParamField>

<ResponseField name="deleted" type="boolean">`true` on success.</ResponseField>

<Warning>
  Deletion is permanent and removes all child content. Make sure you target the right
  `documentId`.
</Warning>

***

## Related

<CardGroup cols={2}>
  <Card title="Ingest a norm (guide)" icon="file-arrow-up" href="/en/guides/ingest-a-norm">
    The end-to-end workflow these tools serve.
  </Card>

  <Card title="Read tools" icon="book-open" href="/en/mcp/read-tools">
    Query the norms once published.
  </Card>
</CardGroup>
