mcp tablas
This commit is contained in:
@@ -1,58 +1,60 @@
|
||||
export const seoSetupWorkflow = {
|
||||
id: "seo_setup",
|
||||
name: "SEO Setup",
|
||||
description: "Configure SEO for a section: meta tags, URL slugs, and structured data.",
|
||||
description: "Configure SEO for a section: meta tags, URL slugs, and detail template.",
|
||||
steps: [
|
||||
{
|
||||
step: 1,
|
||||
action: "Get current table schema",
|
||||
description: "Check if seo_metas is already enabled and if enlace (URL slug) exists.",
|
||||
description: "Check which SEO fields already exist and whether enlace is enabled.",
|
||||
tool: "get_table_schema",
|
||||
critical: "Look for seo_metas flag and enlace configuration in the schema response."
|
||||
critical: "Look for seo_title / seo_description / seo_keywords fields and the enlace field in the schema response."
|
||||
},
|
||||
{
|
||||
step: 2,
|
||||
action: "Enable SEO meta tags",
|
||||
description: "Turn on seo_metas in the table schema to add meta title/description fields.",
|
||||
tool: "update_table_schema",
|
||||
critical: "Set seo_metas=true in the schema. This adds SEO fields to each record."
|
||||
action: "Add SEO meta fields if missing",
|
||||
description: "If seo_title / seo_description / seo_keywords are not present, add them as regular fields. Note: for NEW tables you can instead pass seoMetas=true to create_table and they get added up front.",
|
||||
tool: "create_field",
|
||||
critical: "One create_field call per SEO field. Typical set: seo_title (textfield), seo_description (textbox), seo_keywords (textfield)."
|
||||
},
|
||||
{
|
||||
step: 3,
|
||||
action: "Enable enlace for URL slugs",
|
||||
description: "Enable enlace so records get their own URL-friendly pages.",
|
||||
tool: "update_table_schema",
|
||||
critical: "Set enlace=true. This auto-generates /section/record-name/ URLs for each record."
|
||||
action: "Add enlace field if missing",
|
||||
description: "If the table has no enlace field and records need public URLs, add one. For NEW tables pass enlace=true to create_table instead.",
|
||||
tool: "create_field",
|
||||
critical: "fieldName='enlace', type='textfield'. Acai auto-formats the value to /section/slug/. Existing records then get URLs based on this field."
|
||||
},
|
||||
{
|
||||
step: 4,
|
||||
action: "Update records with SEO data",
|
||||
description: "Fill in SEO fields for each record: meta title, meta description.",
|
||||
description: "Fill in SEO fields for each record: meta title, meta description, keywords.",
|
||||
tool: "create_or_update_record",
|
||||
critical: "SEO fields are typically: seo_title, seo_description. Check the schema for exact field names."
|
||||
critical: "SEO fields are: seo_title, seo_description, seo_keywords. Check the schema for exact field names before writing."
|
||||
},
|
||||
{
|
||||
step: 5,
|
||||
action: "Create or update detail template",
|
||||
description: "Ensure the detail page template includes proper meta tags and structured data.",
|
||||
tool: "save_general_section",
|
||||
critical: "The template uses 'thisrecord' variable. Include meta tags in the template for SEO."
|
||||
action: "Create or update the general section (detail template)",
|
||||
description: "Ensure the detail page template at template/estandar/modulos/custom-{tableName}/index-base.tpl exists and includes the SEO meta tags. The CMS renders this module automatically on each record URL.",
|
||||
tool: "acai-write",
|
||||
critical: "Folder must be EXACTLY 'custom-' + tableName. Inside the Twig, access record data via `thisrecord.seo_title`, `thisrecord.seo_description`, etc. Include these in the <head> via the layout's SEO slot, or inline if the project uses per-section heads."
|
||||
}
|
||||
],
|
||||
context: {
|
||||
enlace_behavior: "When enlace is enabled, Acai auto-generates URL slugs in /section/record-name/ format. The enlace field value is auto-formatted with slashes.",
|
||||
seo_fields: "Enabling seo_metas adds meta title and description fields to the record editor. These are used in the <head> of the detail page.",
|
||||
detail_template: "The general section template (save_general_section) defines what renders when a user visits a record's URL. Uses 'thisrecord' to access the current record's data."
|
||||
enlace_behavior: "When the table has an 'enlace' field, Acai auto-generates URL slugs in /tableName/record-slug/ format. The value is auto-formatted with slashes.",
|
||||
seo_fields: "SEO meta fields are just regular textfield/textbox fields named seo_title, seo_description, seo_keywords. For new tables you can skip this step by passing seoMetas=true to create_table.",
|
||||
detail_template: "For any table with enlace, the record URL is rendered by the module 'custom-{tableName}' (convention — not configurable). The module accesses the current record via `thisrecord`. There is no '_detailPage' field."
|
||||
},
|
||||
rules: [
|
||||
"Table names WITHOUT 'cms_' prefix",
|
||||
"update_table_schema requires both tableName and the schema object",
|
||||
"Enlace values are auto-formatted to /path/ format",
|
||||
"SEO meta fields are only available after enabling seo_metas on the table"
|
||||
"SEO fields are regular fields, not a special flag on the schema",
|
||||
"The general section (detail template) is ALWAYS a module named 'custom-{tableName}' — never a separate page in 'apartados'.",
|
||||
"There is no update_table_schema / _detailPage — routing is by convention on the module folder name."
|
||||
],
|
||||
warnings: [
|
||||
"DO NOT enable enlace on a 'single' type table — single tables have only one record and usually don't need individual URLs",
|
||||
"DO NOT forget to create a detail template after enabling enlace — without it, record URLs show blank pages"
|
||||
"DO NOT enable enlace on a 'single' type table — single tables have one record and usually don't need individual URLs",
|
||||
"DO NOT forget to create the 'custom-{tableName}' module after enabling enlace — without it, record URLs show blank pages",
|
||||
"DO NOT configure '_detailPage' — it does not exist."
|
||||
],
|
||||
resources: []
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user