Define a tag, type, field or correspondent
Adds, renames or deletes a tag, a document type, a custom field or a correspondent to file things with.
$0.001 a call
From your agent’s balance. A call that fails costs nothing.
An example
Add a Total field for amounts in dollars, so we can file invoices by their total.
Your agent callsfiles_define$0.001 a call
The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.
{
"kind": "field",
"name": "Total",
"field_type": "money",
"currency": "USD"
}Use it when
Files need a tag, type, field or correspondent that does not exist yet.
What it does
Add, rename or delete one of the account's own ways to file things: a tag, a document_type (Invoice, Contract, Receipt), a custom field (field_type: text, number, money, date, boolean (yes/no) or url; a money field has a default currency) or a correspondent (link it to a CRM company_id or contact_id). Matched by name, any case. Deleting takes it off every file (a field's values go with it). $0.001.
What comes back
What was defined (its kind, name, type, currency, CRM link) and created, or what was deleted. Every reply also carries cost_usd and balance_usd.
Inputs
| Name | Type | What it is |
|---|---|---|
kindRequired | string | One of: tag,document_type,field,correspondent. |
nameRequired | string | 1 to 200 characters. |
new_name | string | Up to 200 characters. |
field_type | string | One of: text,number,money,date,boolean,url. |
currency | string or null | A money field's currency for values given without one. Matches ^[A-Za-z]{3}$. |
company_id | integer or null | At least 1. |
contact_id | integer or null | At least 1. |
delete | boolean | Default: false. |
The call
Over MCP, call files_define on https://api.conecto.chat/mcp/files. Over REST:
curl -X POST https://api.conecto.chat/v1/tools/files_define \
-H "Authorization: Bearer $CONECTO_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"field","name":"Total","field_type":"money","currency":"USD"}'When it refuses
A refused call costs nothing and says what to do next.
| Code | When | What to do |
|---|---|---|
invalid_input400 | The name is empty or too long, or a new field has no field_type. | Give a name, and a field_type for a new field. |
name_taken409 | Something of that kind has that name already. | Pick another name. |
not_found404 | The CRM record or the thing to rename or delete does not exist. | Check it with files_definitions. |
type_fixed409 | Files have values for the field, so its type stays. | Add a new field instead. |
limit_reached409 | The business has as many of these as it may. | Delete some with files_define. |
More Files tools
All 13 tools- Upload a file
files_uploadStores a file in the business's file store from its bytes, its text or a public link, with a download link.$0.001 a call - Get an upload link
files_upload_linkA one-time link to upload one file of up to 25 MB, to use yourself or hand to a person.Free - Find files
files_listThe business's files, newest first, filtered by name, words inside, tags, type, correspondent, document date or fields.Free* - Get a file
files_getOne file's details and a fresh download link, with the text of a small text file if asked.Free* - Read a file's words
files_read_textThe words in a file as Conecto read them: text files, PDFs, office files, HTML, and scans once read with OCR.Free* - Say what files are
files_editSays what one file is, or up to 100 at once: title, notes, document date, correspondent, type, tags and fields.$0.005 per file changed - List tags, types, fields and correspondents
files_definitionsThe tags, document types, custom fields and correspondents the business files with, each with how many files use it, and the OCR settings.Free* - Read a scan with OCR
files_ocrReads the words in a scan with OCR: an image, or the pages of a PDF without text; the text is kept.$0.005 per page read
Give this to your agent.
Set up Conecto from https://conecto.chat/SKILL.md