This document provides an optional reference interface (Protocol) for agent systems that want structured tooling around Calendar.md.
Note on "Skills": This document describes the interface. The implementation of this interface (including scripts and configuration) is provided in the separate
calendar-skillsproject.
- Safety: Prevents agents from corrupting the file format.
- Precision: Ensures fields like ISO dates and UUIDs are generated correctly.
- Ease of Use: Agents are trained to use tools (Function Calling) more reliably than raw text editing.
Below are the recommended tool definitions for any Agent System (e.g., OpenAI, Claude, LangChain) integrating with Calendar.md.
Use this tool to add a new event to the calendar.
{
"name": "calendar_add_event",
"description": "Adds a new event to the calendar. This appends a log entry to the monthly log file.",
"parameters": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Date of the event in YYYY-MM-DD format",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"title": {
"type": "string",
"description": "Short title of the event"
},
"description": {
"type": "string",
"description": "Detailed description or notes"
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "Tags for categorization (e.g., 'Holiday', 'Work', 'Release')"
}
},
"required": ["date", "title"]
}
}Use this tool to modify an existing event.
{
"name": "calendar_update_event",
"description": "Updates an existing event by ID.",
"parameters": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The UUID of the event to update"
},
"changes": {
"type": "object",
"description": "Fields to update",
"properties": {
"date": { "type": "string" },
"title": { "type": "string" },
"description": { "type": "string" },
"tags": { "type": "array", "items": { "type": "string" } }
}
},
"reason": {
"type": "string",
"description": "Reason for the update (optional, for audit log)"
}
},
"required": ["id", "changes"]
}
}- Discovery: The system prompt tells the Agent: "You have tools to manage the calendar. Do not edit files directly."
- Intent: The user says "Schedule a meeting next Friday."
- Call: The Agent calculates the date and calls
calendar_add_event({ date: "2023-11-10", title: "Meeting" }). - Execution:
- The Agent Platform (Runtime) receives the tool call.
- It generates a new UUID.
- It creates a log line:
2023... | @agent | ADD | { ... }. - It appends this line to
.calendar/logs/YYYY/MM.log. - It triggers the
generate.tsscript to update the view.
- Response: The system tells the Agent "Event added successfully with ID 123." The Agent tells the user "I've scheduled the meeting."
- Agents must not edit generated view files directly.
- Agents must append to
.calendar/logs/YYYY/MM.logand then regenerate views. - Log timestamps must use
config.yamltimezonewithoutZsuffix.