# Ingestion Rule

> > This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

# Ingestion Rule

> This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

Routes a file content_type to a converter (tool or agent) so ingestion can turn non-native files (images, audio, scanned PDFs) into Documents. See the Ingestion Rules module docs for the matching and converter-invocation model.

## Syntax

```yaml
type: ingestion_rule
properties:
  content_type_glob: String
  tool_id: String
  agent_id: String
  action: String
  preset_parameters: Object
  native_extraction: String
  file_delivery: String
  chunk_strategy: String
  chunk_size: Integer
  chunk_overlap: Integer
  metadata: Object
```

## Output

The physical resource ID is the **public ID** of the created resource. Reference it from other resources with a `ref` expression:

```yaml
      some_field:
        ref: MyIngestionRule
```

## Properties

**`content_type_glob`**

MIME type glob matched against a file's content_type (e.g. image/*, audio/mpeg, application/pdf)

_Required_: Yes
_Type_: String

---

**`tool_id`**

Converter tool ID (mutually exclusive with agent_id)

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`agent_id`**

Converter agent ID (mutually exclusive with tool_id)

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`action`**

Operation id, required for builtin/mcp tool converters

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`preset_parameters`**

Merged into the tool input before invocation (tool converters only)

_Required_: No
_Type_: Object
_Nullable_: Yes

---

**`native_extraction`**

For native types (PDF/text): `first` (default) converts only when native extraction yields no text; `skip` always converts.

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`file_delivery`**

How the file reaches a tool converter — base64 (default) or download_url

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`chunk_strategy`**

Default chunk strategy (page/whole/size), overridable per ingest request

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`chunk_size`**

Default window size in characters for the size strategy

_Required_: No
_Type_: Integer
_Nullable_: Yes

---

**`chunk_overlap`**

Default overlap in characters for the size strategy

_Required_: No
_Type_: Integer
_Nullable_: Yes

---

**`metadata`**

Arbitrary JSON metadata

_Required_: No
_Type_: Object
_Nullable_: Yes

---
