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

# Add a user-tier vocabulary entry

> Add an entity type or predicate to the extraction vocabulary. The name is normalized
to snake_case; the description becomes part of the extraction prompt, so write it
like a rule ("a named drug or supplement"). Takes effect on the next index run.




## OpenAPI

````yaml /openapi.yaml post /memory/schema
openapi: 3.1.0
info:
  title: memloom local API
  version: 0.1.0
  description: >
    The HTTP API served by the `memloom serve` daemon on your machine. The CLI,
    the MCP server,

    and the viewer all route through this API. The daemon is the single owner of
    the store, so

    every client shares one consistent view of your memories.


    No authentication: the daemon binds to `127.0.0.1` only and is reachable
    solely from your

    own machine. Browser clients on other localhost ports are allowed via CORS.
servers:
  - url: http://127.0.0.1:4319
    description: Local memloom daemon
security: []
paths:
  /memory/schema:
    post:
      summary: Add a user-tier vocabulary entry
      description: >
        Add an entity type or predicate to the extraction vocabulary. The name
        is normalized

        to snake_case; the description becomes part of the extraction prompt, so
        write it

        like a rule ("a named drug or supplement"). Takes effect on the next
        index run.
      operationId: addSchemaEntry
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - kind
                - name
              properties:
                kind:
                  type: string
                  enum:
                    - entity_type
                    - predicate
                name:
                  type: string
                  example: medication
                description:
                  type: string
                  example: a named drug or supplement
      responses:
        '200':
          description: The created (or re-activated) entry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SchemaEntry'
        '400':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    SchemaEntry:
      type: object
      description: One row of the vocabulary registry.
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - entity_type
            - predicate
        name:
          type: string
          example: medication
        description:
          type: string
        tier:
          type: string
          enum:
            - system
            - user
            - proposed
        status:
          type: string
          enum:
            - active
            - disabled
            - dismissed
        occurrences:
          type: integer
          description: How many extraction runs suggested this name (proposals only).
        examples:
          type: array
          description: >-
            The saved occurrences behind a proposal (proposals only).
            Entity-type proposals carry `entity`; predicate proposals carry
            `from`/`to`/`confidence`. Approval links these into the graph
            without re-indexing.
          items:
            type: object
            properties:
              entity:
                type: string
              from:
                type: string
              to:
                type: string
              confidence:
                type: number
              sourceId:
                type: string
  responses:
    ValidationError:
      description: The request body failed validation. `issues` names each offending field.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: invalid request body
              issues:
                type: array
                items:
                  type: object
                  properties:
                    path:
                      type: string
                      example: query
                    message:
                      type: string
                      example: query must be a non-empty string

````