define_type
Create a validated user-defined ontology type and append it to ontology-user.yaml, enforcing unique names, canonical parent types, and allowed field types before writing.
Instructions
Define a new user type and append it to ontology-user.yaml. Returns {"defined": true, "name": str, "extends": str} on success, or {"defined": false, "errors": [...]} if validation fails.
Rules enforced before writing:
name must not collide with any canonical or existing user type
extends must name a canonical root type (not a user type, and not
skill, which extendsprocedure)all user-defined fields are optional; inherited fields cannot be redefined
field type must be one of: string | array | datetime | enum | boolean
Args: name: New type name (lowercase, hyphenated) extends: Canonical root parent type (document, article, task, procedure, etc.) description: Short description of what this type represents fields: Optional extra fields: [{name, type, values?}]. Omit 'values' for non-enum fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| fields | No | ||
| extends | Yes | ||
| description | Yes |