---
title: "Check Protocol Name Endpoint"
method: POST
path: "/protocols/check_name"
tags: ["protocols"]
---

# Check Protocol Name Endpoint

`POST /protocols/check_name`

Check whether a protocol's name describes what the protocol does.

Advisory only. A 'mismatch' never blocks saving a protocol — the name is the
user's to choose, and a model that misreads a naming convention must not be
able to stop work.

Returns 'uncheckable' for a name that makes no claim (a codename like
"ETR874", a generic "Test", or a name carried in from an uploaded vendor
file), so callers can render nothing at all in those cases.

Parameters
----------
body : CheckProtocolNameRequest
    The name, the protocol it names, and whether the name came from a file.

Returns
-------
CheckProtocolNameResponse
    The verdict, its confidence, the specific contradictions, and a
    suggested name.

## Request body

- CheckProtocolNameRequest — Request body for checking a protocol name against its protocol.
  - `name` string, required — The protocol name to check, as the user typed it.
  - `protocol` union, required — The protocol as UCP YAML text or a parsed mapping.
    - string
    - object
  - `name_from_file` boolean — True when the name came from an uploaded protocol file rather than from the user. The check then returns 'uncheckable' without calling the model: the name is the vendor file's, so a mismatch is not something the user can act on.

## Response `200`

Successful Response

- CheckProtocolNameResponse — The verdict on whether a name describes its protocol.
  - `verdict` string, required — 'match' when nothing in the name contradicts the protocol, 'mismatch' when something does, 'uncheckable' when the name makes no claim to check (a codename, an identifier, or a name carried in from a file). Only 'mismatch' should surface anything in the UI.
  - `confidence` number, required — Confidence in a 'mismatch' verdict, 0-1. Above 0.8 is a contradiction pinned to a number; around 0.5 is a judgement call on wording. Always 1.0 for 'match' and 'uncheckable'.
  - `mismatches` NameMismatchResponse[] — One entry per contradicted claim, most important first.
    - `aspect` string, required — Which claim is contradicted: 'c_rate', 'cycle_count', 'test_type', 'voltage', 'temperature', 'duration' or 'other'.
    - `claim` string, required — What the name says.
    - `actual` string, required — What the protocol actually does.
  - `summary` string — One sentence naming the contradiction. Empty unless mismatched.
  - `suggested_name` string — A corrected name in the user's own style, or empty when there is nothing to correct or the correction equals the current name.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/ionworks/apis/fastapi.md) · [All operations](https://skmtc.dev/ionworks/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ionworks/fastapi/revisions/7337a3cbdaf2/schema)
