> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentlinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save classification definition

> Save or retire an administrator-owned tag or subtype definition.

`save_classification_definition`

Save or retire an administrator-owned tag or subtype definition. Semantic edits keep prior snapshots and invalidate old subtype applicability. Makes no model request.

<Note>This command name is absent from deployment evidence dated 2026-09-20. Hosted availability for this current definition is unverified; inspect your connected catalog before invoking it. Verify the command and its input schema in the selected environment.</Note>

| Access | Behavior |
| - | - |
| `watches:read`, `classification:write` | Writes or admits work |

This operation changes saved state. Review its inputs and retry behavior before calling.

## Example request

Connect through [MCP](/guides/connect-mcp), [CLI](/guides/connect-cli), or [HTTP](/guides/connect-http). Replace example identifiers with records from your workspace.

<CodeGroup>
  ```json MCP theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "save_classification_definition",
      "arguments": {
        "projectId": "project_example",
        "expectedRevision": 0,
        "reason": "Track this campaign.",
        "definition": {
          "id": "customer:project_example:organizational:campaign",
          "family": "organizational",
          "name": "Campaign"
        }
      }
    }
  }
  ```

  ```bash CLI theme={null}
  agentlinkops call save_classification_definition --args '{"projectId":"project_example","expectedRevision":0,"reason":"Track this campaign.","definition":{"id":"customer:project_example:organizational:campaign","family":"organizational","name":"Campaign"}}'
  ```

  ```bash HTTP theme={null}
  curl --fail-with-body https://app.agentlinkops.com/v1/commands/save_classification_definition \
    -H "Authorization: Bearer $AGENTLINKOPS_TOKEN" \
    -H 'Content-Type: application/json' \
    --data '{"projectId":"project_example","expectedRevision":0,"reason":"Track this campaign.","definition":{"id":"customer:project_example:organizational:campaign","family":"organizational","name":"Campaign"}}'
  ```
</CodeGroup>

## Returned result

Illustrative data validated against the documented response schema. IDs and dates are examples, not a live account capture. MCP returns this data in `structuredContent` and in a text content block; generic HTTP and CLI return the JSON result directly.

```json theme={null}
{
  "revision": 1,
  "inferenceEffect": "none"
}
```

## Input fields

Omit optional fields when you do not want to supply them. Null is accepted only where listed. Unknown input properties are rejected.

* **`projectId`** (string, required): project ID from create/list. minLength: 1; maxLength: 200
* **`expectedRevision`** (integer, required): Previously read revision; mismatches reject concurrent updates. minimum: 0; maximum: 9007199254740991
* **`reason`** (string, required): reason; see schema. minLength: 1; maxLength: 500
* **`definition`** (object, required): definition; see schema. additional fields rejected

<Accordion title="All fields and nested objects">
  | Field | Type | Presence | Meaning and constraints |
  | - | - | - | - |
  | `projectId` | string | Required | project ID from create/list. minLength: 1; maxLength: 200 |
  | `expectedRevision` | integer | Required | Previously read revision; mismatches reject concurrent updates. minimum: 0; maximum: 9007199254740991 |
  | `reason` | string | Required | reason; see schema. minLength: 1; maxLength: 500 |
  | `definition` | object | Required | definition; see schema. additional fields rejected |
  | `definition.id` | string | Required | minLength: 1; maxLength: 200 |
  | `definition.family` | string | Required | values: "organizational", "subtype", "semantic" |
  | `definition.name` | string | Required | minLength: 1; maxLength: 64 |
  | `definition.color` | string / null | Optional | |
  | `definition.order` | integer | Optional | minimum: 0; maximum: 1000 |
  | `definition.retired` | boolean | Optional | |
  | `definition.parentId` | string | Optional | Identifier returned by the related operation. minLength: 1; maxLength: 200 |
  | `definition.taxonomyVersion` | string | Optional | minLength: 1; maxLength: 200 |
  | `definition.definition` | string | Optional | minLength: 1; maxLength: 1000 |
  | `definition.inclusions` | array | Optional | minItems: 1; maxItems: 8 |
  | `definition.exclusions` | array | Optional | minItems: 1; maxItems: 8 |
  | `definition.positiveExamples` | array | Optional | minItems: 1; maxItems: 8 |
  | `definition.negativeExamples` | array | Optional | minItems: 1; maxItems: 8 |
  | `definition.insufficientEvidence` | string | Optional | minLength: 1; maxLength: 500 |
</Accordion>

### Validation and omitted values

Append an administrator-owned tag or subtype definition and preserve earlier snapshots.

Subtype attachments require an accepted matching parent role. Retirement preserves past attachments and prevents new ones. Semantic definitions remain unevaluated.

## Output fields

Fields inside optional or nullable parents apply only when that parent exists. [Common schema conventions](/reference/schemas) explain evidence states, empty lists and extensions.

| Field | Type | Presence | Meaning and constraints |
| - | - | - | - |
| `revision` | integer | Required | Optimistic concurrency revision; supply it as expectedRevision on the next write. minimum: 0; maximum: 9007199254740991 |
| `inferenceEffect` | string | Required | must equal "none" |

[Download input schema](/schemas/save_classification_definition.input.json) · [Download output schema](/schemas/save_classification_definition.output.json)

## Errors and retries

This write is not annotated idempotent. After a timeout, inspect existing state before repeating it. Operation-specific errors include `CLASSIFICATION_PRECONDITION_CHANGED`, `CLASSIFICATION_METADATA_SCHEMA_UNAVAILABLE`, `CLASSIFICATION_ACCESS_DENIED`.

See [error recovery](/reference/errors) for status, scope, cooldown, cursor and retry handling. Unknown observations are result data and do not establish loss.

## HTTP resource routes

These existing resource routes share the operation’s domain behavior. Their parameter placement, status and response envelope can differ from generic invocation. See [HTTP route details](/reference/http/routes).

| Method and route | Success | Details |
| - | - | - |
| `POST /v1/projects/{projectId}/classification-metadata/definitions` | 200 | The URL selects projectId. Remaining arguments go in JSON. A supplied projectId that differs from the URL returns 409 CLASSIFICATION\_SCOPE\_MISMATCH. |

## Continue

[get\_classification\_metadata](/reference/commands/get_classification_metadata)

Follow the [related workflow](/guides/monitor-changes), inspect [capability status](/capability-status), or return to the [command index](/reference/index).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.