# What is new in Total.js 5 0.0.20

> The additions and fixes of Total.js 5 0.0.20, the release that is not published on npm yet, with the recipe that shows each one and the pages of this site that describe the behavior of 0.0.19.

Framework: total5
Product: Total.js 5 (total5@0.0.20)
Language: en
Content-SHA256: db1b8bcef476cedf940c4ff10cbe6004936616551e1b823a9af5317e11c5ebad
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: total5-installed@total5@0.0.19
Review: not-recorded

Total.js 5 `0.0.20` is in the official repository (`0.0.20-1`) and is not published on npm yet. This page lists what it adds and fixes. The recipes marked **since 0.0.20** run against that source; the rest of the cookbook is executed against the published `total5@0.0.19`. When `0.0.20` is published, run `npm install total5@0.0.20` and the whole cookbook is checked against it.

## What it adds

| Addition | What it does | Recipe |
|---|---|---|
| `mcp` module | Actions with `mcp: true` become tools of a built-in MCP server at `POST /$mcp/` (enabled with `CONF.$mcp`), with the schema generated from `input`, `query`, `params` and `output`; `Total.mcp.auth` checks the caller | [mcp-tools-from-actions](/en/total5/mcp-tools-from-actions/) |
| `JSONSchema.toAITool(name)`, `JSONSchema.toAIObject(name, description)` and `action.toAITool()` | Describe a function or a structured output for an AI model from a compact schema or from an action | [json-schema-for-ai-tools](/en/total5/json-schema-for-ai-tools/) |
| `QueryBuilder.autoqueryjson($, column, schema, defsort, maxlimit)` | Like `autoquery()` for the properties of a JSON or JSONB column, with an allowlist; the adapter writes the SQL | [query-builder-json-columns](/en/total5/query-builder-json-columns/) |
| `$.content(value, contentType)` | Sends a string or a Buffer with the content type you choose | [response-content-type](/en/total5/response-content-type/) |
| `cache` option of `NEWACTION()` | Keeps the response for the same `query`, `params`, `input`, `user` or `language`, and skips the middleware and the action while the entry lives | [action-cache-option](/en/total5/action-cache-option/) |
| `U.validhost(host)` and `U.tohost(host)` | Accept only plain hostnames and canonical IP literals, and return the canonical ASCII form of a host | [hostname-validation](/en/total5/hostname-validation/) |
| Compact schema types `json` and `ip` | The values are validated (a JSON text and an IP address) instead of being plain strings | [schema-enums-and-formats](/en/total5/schema-enums-and-formats/) |
| `Total.FsPromises` | A link to `node:fs/promises` | `Total.FsPromises.readFile(filename, 'utf8')` |
| `reset` event of a FlowStream | Emitted when the FlowStream receives the `reset` message, which also clears its error list | `flow.on('reset', function() {})` |

## What it fixes

- `CRON()` with the step form (`*/15`, `5/20`) matches the values of the step and not every value.
- The `limit` argument of `setTimeout2()` works. See [debounce-timers](/en/total5/debounce-timers/).
- `AJAX()` settles for answers of type `application/xml` and `text/xml`. See [ajax-requests](/en/total5/ajax-requests/).
- `IMPORT()` gives an error for an answer with the status 400 or more, or for a file that is not a module. See [import-remote-module](/en/total5/import-remote-module/).
- `F.python()` without a callback resolves its promise with the output, and `F.pipinstall()` works without a callback.
- `LOGMAIL()` accepts an object as the body. See [logmail](/en/total5/logmail/).
- `$.href()` of a controller works. See [upload-lifecycle-and-href](/en/total5/upload-lifecycle-and-href/).
- `QueryBuilder.gridfields()` applies the accepted fields. See [query-builder-contract](/en/total5/query-builder-contract/).
- `LDAP()` gives an error when a bind answers with a status other than 0, even when the server sends no text. See [ldap-openldap](/en/total5/ldap-openldap/).
- The mail: `attachmentfs()` reads the file of the storage as a Buffer and completes the message, `attachment()` with a Buffer encodes the whole Buffer as one Base64 text, and the `server` is normalized (an invalid hostname answers `Invalid SMTP server hostname.`).
- The view engine command `@{hostname()}`, the tunnel client messages `error` and `abort`, and the handling of pending requests.
- `AIPARSER()` with tool calling.
- Security: the hostnames are normalized and validated in the framework itself because of the Node.js security release of 2026-10-21 (CVE-2026-105482, CVE-2026-105483, CVE-2026-106069 and CVE-2026-106072). `U.resolve()` and `U.connect()` reject an invalid hostname. The framework does not require a specific version of Node.js. The Brotli issue CVE-2026-111497 does not affect it, because only `gzip` and `deflate` are decompressed, and the keep-alive socket issue CVE-2026-105481 is fixed by updating Node.js.

## Pages that describe 0.0.19

Eight recipes document, and test, the behavior of the published `total5@0.0.19` where `0.0.20` changed it: [ajax-requests](/en/total5/ajax-requests/), [debounce-timers](/en/total5/debounce-timers/), [import-remote-module](/en/total5/import-remote-module/), [ldap-openldap](/en/total5/ldap-openldap/), [logmail](/en/total5/logmail/), [query-builder-contract](/en/total5/query-builder-contract/), [schema-enums-and-formats](/en/total5/schema-enums-and-formats/) and [upload-lifecycle-and-href](/en/total5/upload-lifecycle-and-href/). Their statements are right for 0.0.19. The `cache` option of `NEWACTION()` listed in [action-options](/en/docs/action-options/) also has an effect only from `0.0.20`.
