Define object type
define_objectCreate a new custom object TYPE (e.g. Partner, Product, Investor) that you can then operate on via create_record/update_record/search_records. Admin-only. Anti-sprawl: if a similar object already exists this returns a suggestion to reuse it — pass confirm_new:true to create anyway. display_field names the data key holding a record's display name (default 'name') — the entity matcher and cards use it. Returns the created object definition.
When to use: When an admin wants to track a kind of thing the built-in objects don't cover — a genuinely new noun, not a relationship type (investor/partner are stickers on a company/person, not objects). Anti-sprawl checks for near-duplicates first.
Example: We manage real estate — add a Property object.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| icon | No | A key from Capable's curated object-icon set (e.g. landmark, factory, handshake, flask); an unknown key is rejected with suggestions. Omit for the neutral default. | |
| blurb | No | One short sentence saying what records of this object represent; shown in describe_schema and Settings. | |
| label | Yes | Singular display name, e.g. Partner. Its slug (lowercase, underscores) becomes the object's stable key; a built-in's key is refused. | |
| plural | No | Plural display name for lists and the menu. Defaults to the label + "s". | |
| shared | No | true lets any non-viewer edit every record of this object; false (the default) lets only the record's owner, admins and managers edit it. | |
| confirm_new | No | Pass true to create even when a similar object exists; otherwise the anti-sprawl check returns the matches instead of creating. | |
| display_field | No | The data key holding a record's display name — a lowercase field key such as "name" or "fund_name"; defaults to "name". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object | No |