Skip to content

Commit 57633c9

Browse files
committed
add some apis and iframe field description
1 parent c1d96b8 commit 57633c9

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": "0.2",
33
"name": "microcms-mcp-server",
44
"display_name": "microCMS MCP Server",
5-
"version": "0.6.0",
5+
"version": "0.7.0",
66
"description": "microCMSのMCP Serverです。LLMから直接コンテンツの取得や入稿ができます。",
77
"icon": "assets/icon.png",
88
"author": {

src/constants.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ export const FIELD_FORMATS_DESCRIPTION = `
33
44
## Important
55
Ensure that the "content" you submit strictly adheres to the following specifications.
6-
In particular, take extra care when handling custom fields, as mistakes are common in their structure.
6+
In particular, take extra care when handling custom fields and iframe fields, as mistakes are common in their structure.
77
Read the instructions thoroughly and construct the data precisely as described.
8+
In particular, for extended fields (iframe fields), you need to take care to call microcms_get_list tool beforehand, and set its structure to the "data" field (Detail is described below).
89
910
## Field type specifications
1011
@@ -22,4 +23,19 @@ export const FIELD_FORMATS_DESCRIPTION = `
2223
"key2": "<value2>",
2324
}
2425
\`\`\`
26+
* iframe field (Extension field) expects the following structure for CREATE/UPDATE:
27+
\`\`\`json
28+
{
29+
"id": "some-id",
30+
"title": "some-title",
31+
"description": "some-description",
32+
"imageUrl": "https://images.microcms-assets.io/assets/xxxx/yyyy/{fileName}.png",
33+
"updatedAt": "2024-01-01T00:00:00Z",
34+
"data": { "key1": "value1", "key2": "value2" }
35+
}
36+
\`\`\`
37+
* **IMPORTANT**: When retrieving content via API, only the "data" object content is returned (without the wrapper).
38+
* **IMPORTANT**: When creating/updating content, you MUST provide the full structure including id, title, description, imageUrl, updatedAt, and data.
39+
* To understand the "data" structure, ALWAYS use microcms_get_list to retrieve existing content first and examine the field structure.
40+
* "id", "title", "description", "imageUrl" are metadata displayed in the admin screen and are not included in the API GET response.
2541
`;

src/tools/get-content-meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ export async function handleGetContentMeta(params: ToolParameters) {
3535
return await getContentManagement(endpoint, contentId);
3636
}
3737

38+

src/tools/patch-content-created-by.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ export async function handlePatchContentCreatedBy(
4646
return { message: `Content ${contentId} creator changed to ${createdBy}`, id: result.id };
4747
}
4848

49+

src/tools/patch-content-status.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ export async function handlePatchContentStatus(
4747
return { message: `Content ${contentId} status changed to ${status}` };
4848
}
4949

50+

0 commit comments

Comments
 (0)