---
name: "documents_template_fields"
area: "documents"
title: "List a template's fields"
price: "free"
method: "POST"
url: "https://api.conecto.chat/v1/tools/documents_template_fields"
mcp_server: "https://api.conecto.chat/mcp/documents"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/documents/documents_template_fields"
---

# List a template's fields (`documents_template_fields`)

The placeholders in a Word (.docx) template, so you know what data filling it needs.

The placeholders in a Word (.docx) template, e.g. {{ customer_name }} or a {% for item in items %} loop, so you know what data documents_fill_template needs.

Price: Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads. A call that fails costs nothing.

## Use it when

Before filling a template for the first time.

## Say this to your agent

> Which details does our delivery note template need?

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `file_id` | string | yes | A file in the store (files_upload or files_list give its file_id). Exactly 36 characters. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `documents_template_fields` on the MCP server `https://api.conecto.chat/mcp/documents` with these arguments:

```json
{
  "file_id": "6c8e0a2b-4d6f-4b8a-9c0e-1f3a5c7e9b2d"
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/documents_template_fields \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id": "6c8e0a2b-4d6f-4b8a-9c0e-1f3a5c7e9b2d"}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "documents_template_fields",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.00",
  "balance_usd": "$19.75",
  "result": {
    "fields": [
      "address",
      "customer_name"
    ]
  }
}
```

`result`: fields: the placeholders and loops the template uses.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No file in the store has that file_id. | Find it with files_list, or upload it first. |
| `template_error` | 422 | The template has a broken placeholder. | Fix the placeholder the message names. |
| `template_too_slow` | 422 | Reading the template took too long. | Simplify its loops. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [documents_create_pdf](https://conecto.chat/tools/documents/documents_create_pdf.md): Makes a PDF from Markdown or HTML and saves it in the file store with a download link. $0.02 a call.
- [documents_convert_to_pdf](https://conecto.chat/tools/documents/documents_convert_to_pdf.md): Turns a Word, Excel, PowerPoint, OpenDocument, RTF, CSV, text, Markdown or HTML file into a PDF; the original stays. $0.02 a call.
- [documents_fill_template](https://conecto.chat/tools/documents/documents_fill_template.md): Makes a new Word file from a .docx template, its placeholders filled from data. $0.02 a call.
- [documents_merge_pdfs](https://conecto.chat/tools/documents/documents_merge_pdfs.md): Makes one PDF from several in the store, in the order given. $0.01 a call.
- [documents_read_pdf](https://conecto.chat/tools/documents/documents_read_pdf.md): The text of a PDF in the store, page by page, up to 50 pages a call. Free up to 1,000,000 reads a month.
- [documents_page_images](https://conecto.chat/tools/documents/documents_page_images.md): The pages of a scanned PDF or a photo of a document as images to look at, up to 10 pages a call. $0.005 a call.
- [documents_create_deck](https://conecto.chat/tools/documents/documents_create_deck.md): A PowerPoint deck from your slides, plain or in the business's template, with editable charts, tables and each slide's sources. $0.10 a call.
