threadFieldSchema
Fetches a single thread field schema by its ID. Returns null if no schema with the given ID exists. Selecting the createdBy/updatedBy actor down to its user additionally requires the user:read permission.
threadFieldSchema(threadFieldSchemaId: ID!): ThreadFieldSchemaArguments
Returns
The human-readable name of the field. Must be unique across all thread field schemas in the workspace; reusing a label fails with cannot_create_thread_field_schema.
A stable identifier for the field used when reading and writing values. Must be lowercase and contain only letters, numbers, and underscores (it is validated against ^[a-z0-9_]+$), so camelCase and hyphens are rejected. Set at creation and immutable thereafter — correcting a mistyped key means deleting and recreating the field, which discards any stored values.
Controls the position of this field relative to other thread field schemas in the UI.
Valid options for ENUM-typed fields. Empty for all other field types.
When true, a thread cannot be marked as done until this field has a value.
When true, Plain's AI will attempt to automatically fill this field based on the thread's content. Only supported for ENUM and BOOL field types.
When true, this field may be included as context for an AI agent handling the thread.
When true, the field value can only be set via the API and is not editable by agents in the Plain UI.
If set, this field is only shown when the referenced sibling field has a specific value. Nesting is capped at one level: the referenced parent field must not itself depend on another thread field, otherwise creation fails with cannot_create_thread_field_schema (the dependent nesting level is too deep).
If non-empty, this field is only shown when the thread has at least one of the listed label types.

