---
name: "connect_set_rules"
area: "connect"
title: "Change a system's allowed calls"
price: "$0.001"
method: "POST"
url: "https://api.conecto.chat/v1/tools/connect_set_rules"
mcp_server: "https://api.conecto.chat/mcp/connect"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/connect/connect_set_rules"
---

# Change a system's allowed calls (`connect_set_rules`)

Replaces a connection's allowed calls; waits for the owner's approval by default.

Replace the calls a connection may make. On accounts with an owner it waits for the owner's approval by default, so a key can't widen its own reach. $0.001.

Price: $0.001 a call. A call that fails costs nothing.

## Use it when

The agent needs a call the connection doesn't allow yet, or should lose one.

## Say this to your agent

> Let yourself also add comments to tickets in the old help desk.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `connection` | string | yes | The connection's name. 2 to 40 characters. |  |  |
| `allow` | array of strings | yes | The calls it may make: a method and a path pattern each, like "GET /v1/customers*" or "POST /v1/tickets". * matches anything. 1 to 50 items. |  |  |

## Example

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

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

```json
{
  "connection": "zendesk",
  "allow": [
    "GET /tickets*",
    "PUT /tickets/*"
  ]
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/connect_set_rules \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"connection": "zendesk", "allow": ["GET /tickets*", "PUT /tickets/*"]}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "connect_set_rules",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.001",
  "balance_usd": "$19.75",
  "result": {
    "connection": {
      "name": "zendesk",
      "base_url": "https://hansenvoss.zendesk.com/api/v2",
      "auth": "bearer",
      "header": null,
      "allow": [
        "GET /tickets*",
        "PUT /tickets/*"
      ],
      "description": "The old help desk, until the move is done",
      "created_at": "2026-10-14T08:00:00+00:00",
      "last_used_at": null
    }
  }
}
```

`result`: connection: the connection with its new allowed calls.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No connection has that name. | connect_list shows them. |
| `invalid_input` | 400 | An allowed call is not a method and a path. | Write each like "GET /v1/customers*". |

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

## Related

- [connect_add](https://conecto.chat/tools/connect/connect_add.md): Connects one of the company's systems: its address, its credential (kept encrypted) and the calls it may make. Free.
- [connect_list](https://conecto.chat/tools/connect/connect_list.md): The connected systems with their address, auth and allowed calls, and this month's call count. Free up to 1,000,000 reads a month.
- [connect_preview](https://conecto.chat/tools/connect/connect_preview.md): Shows exactly what a call would send (method, full address, headers with the credential hidden, body) without sending it. Free up to 1,000,000 reads a month.
- [connect_call](https://conecto.chat/tools/connect/connect_call.md): Sends one request to a connected system, inside its allowed calls, and returns its answer. $0.0003 for each started 10 seconds the system takes to answer ($0.0003 when it answers within 10 seconds), up to $0.0012.
- [connect_remove](https://conecto.chat/tools/connect/connect_remove.md): Forgets a connected system and its credential; the system itself doesn't change. Free.
