# archive_field

Hide a custom field. Values already stored are kept, and defining it again brings them back.

| | |
| --- | --- |
| Group | Custom fields |
| Scope | `crm:write` |
| Who can call it | Signed-in people only. Agents don't see this tool over MCP, and calling it with an API key returns `forbidden`. People use it in the Tandem app. |
| Kind | Write. Recorded in the change history with who made it. |
| Retries | Pass `idempotency_key` (MCP) or the `Idempotency-Key` header (REST); a retry with the same key within 24 hours returns the first result. |
| Widget | Text only. |

## Parameters

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `entity_type` | `company` \\| `person` \\| `deal` | yes |  |
| `key` | string | yes |  |

## Call it over MCP

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "archive_field",
    "arguments": {
      "entity_type": "company",
      "key": "…",
      "idempotency_key": "log-call-acme-2026-11-02"
    }
  }
}
```

Send it to `https://api.tandemcrm.app/mcp` (streamable HTTP). Most people never write this by hand: their agent picks the tool from its description.

## Call it over REST

```bash
curl -X POST https://api.tandemcrm.app/v1/ops/archive_field \
  -H "Authorization: Bearer $TANDEM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: log-call-acme-2026-11-02" \
  -d '{"entity_type":"company","key":"…"}'
```

## Input schema

The JSON Schema the MCP server advertises for this tool (over MCP it also accepts `idempotency_key`):

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "entity_type": {
      "type": "string",
      "enum": [
        "company",
        "person",
        "deal"
      ]
    },
    "key": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,39}$"
    }
  },
  "required": [
    "entity_type",
    "key"
  ]
}
```
