Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ npx @kontent-ai/mcp-server@latest sse
* **publish-variant-mapi** – Publish or schedule a language variant for publication. Supports immediate publishing (happens right now) or scheduled publishing at a specific future date and time with optional timezone specification
* **unpublish-variant-mapi** – Unpublish or schedule unpublishing of a language variant. Supports immediate unpublishing (removes content from Delivery API right now) or scheduled unpublishing at a specific future date and time with optional timezone specification

### Utility

* **get-current-datetime** – Get the current date and time in UTC (ISO-8601 format)

## ⚙️ Configuration

The server requires the following environment variables:
Expand Down
2 changes: 0 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { registerTool as registerDeleteContentItemMapi } from "./tools/delete-co
import { registerTool as registerDeleteLanguageVariantMapi } from "./tools/delete-language-variant-mapi.js";
import { registerTool as registerFilterVariantsMapi } from "./tools/filter-variants-mapi.js";
import { registerTool as registerGetAssetMapi } from "./tools/get-asset-mapi.js";
import { registerTool as registerGetCurrentDatetime } from "./tools/get-current-datetime.js";
import { registerTool as registerGetInitialContext } from "./tools/get-initial-context.js";
import { registerTool as registerGetItemDapi } from "./tools/get-item-dapi.js";
import { registerTool as registerGetItemMapi } from "./tools/get-item-mapi.js";
Expand Down Expand Up @@ -66,7 +65,6 @@ export const createServer = () => {
registerFilterVariantsMapi(server);
registerPublishVariantMapi(server);
registerUnpublishVariantMapi(server);
registerGetCurrentDatetime(server);

return { server };
};
5 changes: 2 additions & 3 deletions src/tools/context/initial-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ ALL FOUR elements must be included in language variant using their internal IDs:

**Failure to provide the workflowId parameter will result in workflow step change failures.**

### Current date and time

**CRITICAL**: Always use the **get-current-datetime tool** to obtain the current UTC time. Never assume the current time.

## Essential Concepts

Expand All @@ -116,6 +113,8 @@ ALL FOUR elements must be included in language variant using their internal IDs:

## Best Practices

**CRITICAL**: Never assume the current time. Always obtain the current date and time when needed for time-sensitive operations like scheduling. If the current date and time in UTC format cannot be decisively obtained by any available tool, force the user to specify the current date and time explicitly.

Use snippets for common field groups to maintain consistency and avoid duplication. Plan your content types before creating content to ensure proper structure. **Always use internal IDs when working with MCP tools** for optimal performance and reliability. Leverage taxonomies for organization to create logical content hierarchies. Consider your multilingual strategy early in the planning process to avoid restructuring later.

When working with snippets, always retrieve and understand the complete element structure before creating content variants.
Expand Down
17 changes: 0 additions & 17 deletions src/tools/get-current-datetime.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/tools/publish-variant-mapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const registerTool = (server: McpServer): void => {
),
scheduledTo: z
.string()
.datetime()
.datetime({ offset: true })
.optional()
.describe(
"ISO 8601 formatted date and time when the publish action should occur (e.g., '2024-12-25T10:00:00Z' for UTC or '2024-12-25T10:00:00+02:00' for specific timezone). If not provided, the variant will be published immediately. If provided, must be a future date/time. The actual execution may have up to 5 minutes delay from the specified time.",
Expand Down
2 changes: 1 addition & 1 deletion src/tools/unpublish-variant-mapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const registerTool = (server: McpServer): void => {
),
scheduledTo: z
.string()
.datetime()
.datetime({ offset: true })
.optional()
.describe(
"ISO 8601 formatted date and time when the unpublish action should occur (e.g., '2024-12-25T10:00:00Z' for UTC or '2024-12-25T10:00:00+02:00' for specific timezone). If not provided, the variant will be unpublished immediately. If provided, must be a future date/time. The actual execution may have up to 5 minutes delay from the specified time. When unpublished, the content will no longer be available through the Delivery API.",
Expand Down