Directory

Change a person's groups

directory_set_groups · Changes data · Markdown

Adds a person to groups and takes them out of others.

$0.01 a call

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

An example

Give Jonas the warehouse group and take him out of sales.

Your agent callsdirectory_set_groups$0.01 a call

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
{
  "person": "jonas.becker@hansenvoss.example",
  "add": [
    "00g1warehouse"
  ],
  "remove": [
    "00g2sales"
  ]
}
What comes back
{
  "person_id": "00u3",
  "added": 1,
  "removed": 1
}

Use it when

Someone needs access to another team's apps, or no longer does.

What it does

Add a person to groups and take them out of others (the apps and teams those groups open).

What comes back

person_id; added and removed: how many groups. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
personRequiredstringThe person's id in the directory, or their email. 1 to 200 characters.
addarray of stringsUp to 20 items.
removearray of stringsUp to 20 items.

The call

Over MCP, call directory_set_groups on https://api.conecto.chat/mcp/directory. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/directory_set_groups \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"person":"jonas.becker@hansenvoss.example","add":["00g1warehouse"],"remove":["00g2sales"]}'

When it refuses

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

CodeWhenWhat to do
not_connected409No directory is connected yet.Connect Entra ID or Okta with directory_connect.
not_found404The directory has no such person or group.Look the person up with directory_list_users.
directory_rejected502The directory refused, usually because a permission is missing.Ask its admin to grant what the message names.
directory_unavailable503The directory could not be reached.Try again in a minute; nothing changed.

Give this to your agent.

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