x
This commit is contained in:
1 parent
48aebb2ec9
commit
b693c7188c
8 files changed
+267
-4
No files matched your search
@@ -0,0 +1,2 @@
|
||||
# Backend target used by the MCP server. Override per environment as needed.
|
||||
MCP_BACKEND_URL=https://api.ddc.kittisak.com/api
|
||||
@@ -33,6 +33,7 @@ bun run dev
|
||||
- `update_brand_name` เปลี่ยนชื่อแบรนด์กลางที่ใช้ใน header/footer ของ `apps/spa` และ `apps/website`
|
||||
- `update_store_settings_translation` อัปเดตข้อความแปลของ store settings
|
||||
- `update_footer_content` อัปเดตคำอธิบายแบรนด์และ social links เท่านั้น
|
||||
- `get_footer_brand` / `update_footer_brand` อ่านและแก้ Footer Brand block โดยตรง (brand name, logo, คำอธิบายแยกภาษา, social links) พร้อม `dryRun` และ `expectedVersion`
|
||||
|
||||
## Footer Menu LLM Workflow
|
||||
|
||||
|
||||
@@ -439,6 +439,26 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "get_footer_brand",
|
||||
description: "Read the editable Footer Brand block (name, logo, localized description, and social links). Pass the returned version to update_footer_brand to prevent stale writes.",
|
||||
inputSchema: { type: "object", properties: {} }
|
||||
},
|
||||
{
|
||||
name: "update_footer_brand",
|
||||
description: "Update Footer Brand fields without replacing footer menus. Supports localized description, dryRun preview, and expectedVersion conflict protection.",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
brandName: { type: "string" },
|
||||
logoUrl: { type: ["string", "null"] },
|
||||
description: { type: "object", description: "Locale-to-description map, e.g. { th: '...', en: '...' }" },
|
||||
socialLinks: { type: "object", properties: { facebookUrl: { type: ["string", "null"] }, instagramUrl: { type: ["string", "null"] }, tiktokUrl: { type: ["string", "null"] } } },
|
||||
dryRun: { type: "boolean" },
|
||||
expectedVersion: { type: "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "update_brand_name",
|
||||
description: "Update the brand name used across website and SPA headers, footers, and brand displays.",
|
||||
@@ -1413,6 +1433,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
const res = await api.put("/settings", mergedSettings);
|
||||
return { content: [{ type: "text", text: "Theme tokens updated successfully:\\n" + JSON.stringify(res.data.themeTokens, null, 2) }] };
|
||||
}
|
||||
case "get_footer_brand": {
|
||||
const res = await api.get("/settings/footer-brand");
|
||||
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
|
||||
}
|
||||
case "update_footer_brand": {
|
||||
const payload: any = { ...params };
|
||||
const social = payload.socialLinks;
|
||||
delete payload.socialLinks;
|
||||
if (social && typeof social === "object") Object.assign(payload, social);
|
||||
const res = await api.patch("/settings/footer-brand", payload);
|
||||
return { content: [{ type: "text", text: JSON.stringify({ success: true, tool: "update_footer_brand", ...res.data }, null, 2) }] };
|
||||
}
|
||||
case "update_brand_name": {
|
||||
const { brandName } = params as any;
|
||||
const currentSettingsRes = await api.get("/settings");
|
||||
|
||||
Reference in new issue
Block a user