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

# Check Protocol Name Endpoint

> 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.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /protocols/check_name
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /protocols/check_name:
    post:
      tags:
        - protocols
      summary: Check Protocol Name Endpoint
      description: >-
        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.
      operationId: check_protocol_name_endpoint_protocols_check_name_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckProtocolNameRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckProtocolNameResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CheckProtocolNameRequest:
      properties:
        name:
          type: string
          maxLength: 200
          title: Name
          description: The protocol name to check, as the user typed it.
        protocol:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
          title: Protocol
          description: The protocol as UCP YAML text or a parsed mapping.
        name_from_file:
          type: boolean
          title: Name From File
          description: >-
            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.
          default: false
      type: object
      required:
        - name
        - protocol
      title: CheckProtocolNameRequest
      description: Request body for checking a protocol name against its protocol.
    CheckProtocolNameResponse:
      properties:
        verdict:
          type: string
          title: Verdict
          description: >-
            '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:
          type: number
          title: Confidence
          description: >-
            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:
          items:
            $ref: '#/components/schemas/NameMismatchResponse'
          type: array
          title: Mismatches
          description: One entry per contradicted claim, most important first.
        summary:
          type: string
          title: Summary
          description: One sentence naming the contradiction. Empty unless mismatched.
          default: ''
        suggested_name:
          type: string
          title: Suggested Name
          description: >-
            A corrected name in the user's own style, or empty when there is
            nothing to correct or the correction equals the current name.
          default: ''
      type: object
      required:
        - verdict
        - confidence
      title: CheckProtocolNameResponse
      description: The verdict on whether a name describes its protocol.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NameMismatchResponse:
      properties:
        aspect:
          type: string
          title: Aspect
          description: >-
            Which claim is contradicted: 'c_rate', 'cycle_count', 'test_type',
            'voltage', 'temperature', 'duration' or 'other'.
        claim:
          type: string
          title: Claim
          description: What the name says.
        actual:
          type: string
          title: Actual
          description: What the protocol actually does.
      type: object
      required:
        - aspect
        - claim
        - actual
      title: NameMismatchResponse
      description: One specific way the name contradicts the protocol.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````