create_post_type_field
ActiveTool of FavCRM
declared in 1.0.0
Add a custom field to a post type schema. The field key becomes the key in meta when creating/updating posts. Use fieldType="repeater" with fields=[...] for repeatable structured rows. Use this instead of storing structured data in excerpt.
Parameters schema
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"postTypeId",
"label",
"fieldType"
],
"properties": {
"key": {
"type": "string",
"description": "snake_case key used in meta. Auto-derived from label if omitted."
},
"label": {
"type": "string",
"description": "Human-readable field label, e.g. \"Tagline\""
},
"fields": {
"type": "array",
"items": {
"type": "object",
"required": [
"label",
"fieldType"
],
"properties": {
"key": {
"type": "string",
"description": "snake_case key for this repeater child field. Auto-derived from label if omitted."
},
"label": {
"type": "string",
"description": "Human-readable child field label"
},
"options": {
"type": "object",
"description": "For select/multiselect child fields: { choices: [\"a\",\"b\"] }.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"helpText": {
"type": "string",
"description": "Optional hint shown in the UI"
},
"required": {
"type": "boolean",
"description": "Whether this child field is required on every repeater row"
},
"fieldType": {
"enum": [
"text",
"textarea",
"richtext",
"number",
"boolean",
"date",
"datetime",
"select",
"multiselect",
"url",
"email",
"image",
"file",
"gallery",
"attachments",
"repeater"
],
"type": "string",
"description": "Child field type. Repeaters support scalar/select types plus singular upload fields: text, textarea, richtext, number, boolean, date, datetime, select, multiselect, url, email, image, file. Nested repeaters and array upload fields are not supported."
},
"sortOrder": {
"type": "number"
}
}
},
"description": "Required for fieldType=\"repeater\". Defines the child fields stored in each row object."
},
"options": {
"type": "object",
"description": "For select/multiselect: { choices: [{ label, value }] }. For URL fields that should accept merchant uploads, use { uploadable: true } so the UI stores the uploaded file URL instead of asking the merchant to paste a raw URL.",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"helpText": {
"type": "string",
"description": "Optional hint shown in the UI"
},
"required": {
"type": "boolean",
"description": "Whether the field is required on post creation (default false)"
},
"fieldType": {
"enum": [
"text",
"textarea",
"richtext",
"number",
"boolean",
"date",
"datetime",
"select",
"multiselect",
"url",
"email",
"image",
"file",
"gallery",
"attachments",
"repeater"
],
"type": "string",
"description": "Field type: text | textarea | richtext | number | boolean | date | datetime | select | multiselect | url | email | image | file | gallery | attachments | repeater"
},
"sortOrder": {
"type": "number",
"description": "Sort order (lower = earlier)"
},
"postTypeId": {
"type": "string",
"description": "Post type ID (from list_post_types)"
}
}
}Parent server
FavCRM
https://github.com/favcrm/mcp
1/7 registries