Tables

Change columns

tables_change_columns · Changes data · Markdown

Adds, renames or removes columns; rows keep their values through a rename.

$0.001 a call

From your agent’s balance. A call that fails costs nothing.

An example

Add a column for who works on each bike, Sam or Priya, and call Work "Work to do" instead.

Your agent callstables_change_columns$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.

With these arguments
{
  "table": "Workshop jobs",
  "add": [
    {
      "name": "Mechanic",
      "type": "select",
      "options": [
        "Sam Reyes",
        "Priya Nair"
      ]
    }
  ],
  "rename": {
    "Work": "Work to do"
  }
}
What comes back
{
  "table": {
    "table_id": 4101,
    "name": "Workshop jobs",
    "description": "",
    "rows": 0,
    "columns": [
      {
        "id": "c1",
        "name": "Order",
        "type": "text",
        "required": true
      },
      {
        "id": "c2",
        "name": "Customer",
        "type": "text",
        "required": false
      }
    ]
  }
}

Use it when

The business wants to track one more thing, or a column has the wrong name.

What it does

Add columns, rename them, or remove them (their values go too). Rows keep their values through renames.

What comes back

table: the table with its new columns. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
tableRequiredstringThe table's name (or its table_id). 1 to 80 characters.
addarray of objectsUp to 50 items.
add[].nameRequiredstring1 to 60 characters.
add[].typestringOne of: text,long_text,number,checkbox,date,datetime,select,multi_select,email,url,phone,file. Default: text.
add[].requiredboolean
add[].optionsarray of stringsUp to 100 items.
add[].decimalsinteger0 to 6.
add[].currencystringMatches ^[A-Za-z]{3}$.
renameobject{"old name": "new name"}.
removearray of stringsUp to 50 items.

The call

Over MCP, call tables_change_columns on https://api.conecto.chat/mcp/tables. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/tables_change_columns \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"table":"Workshop jobs","add":[{"name":"Mechanic","type":"select","options":["Sam Reyes","Priya Nair"]}],"rename":{"Work":"Work to do"}}'

When it refuses

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

CodeWhenWhat to do
not_found404No table has that name or table_id, or the table has no column of that name.Call tables_list for the tables and their columns.
invalid_input400A column has no name or a name in use, an unknown type, a select without options, or a currency that is not a 3-letter code.Give each column its own name, a type from the list, and options for select columns.
invalid_input400The change would leave no column, or more than 100.Keep 1 to 100 columns.

Give this to your agent.

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