Documents

List a template's fields

documents_template_fields · Reads only · Markdown

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

Free*

*Free up to 1,000,000 reads a month for the whole account, then $0.50 per 10,000 reads.

An example

Which details does our delivery note template need?

Your agent callsdocuments_template_fieldsFree*

The example business is Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff. The reply is the one the tool really gives.

With these arguments
{
  "file_id": "6c8e0a2b-4d6f-4b8a-9c0e-1f3a5c7e9b2d"
}
What comes back
{
  "fields": [
    "address",
    "customer_name"
  ]
}

Use it when

Before filling a template for the first time.

What it does

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.

What comes back

fields: the placeholders and loops the template uses. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
file_idRequiredstringA file in the store (files_upload or files_list give its file_id). Exactly 36 characters.

The call

Over MCP, call documents_template_fields on https://api.conecto.chat/mcp/documents. Over REST:

Terminal
curl -X POST 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"}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
not_found404No file in the store has that file_id.Find it with files_list, or upload it first.
template_error422The template has a broken placeholder.Fix the placeholder the message names.
template_too_slow422Reading the template took too long.Simplify its loops.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md