create_activity
Create private activities for tracking behavioral sessions like meditation, focus, and exercise. Automates timestamp recording and duration calculations for personal session management.
Instructions
Create a custom PRIVATE activity visible only to your account. Free (0 credits).
Args:
activity_name: Name for the new activity (max 64 characters).
description: Optional description of the activity.Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| activity_name | Yes | ||
| description | No |
Implementation Reference
- server.py:131-144 (handler)The create_activity tool handler function decorated with @mcp.tool(). It creates a custom PRIVATE activity by posting to the /activities endpoint with activity_name and optional description parameters.
@mcp.tool() def create_activity(activity_name: str, description: str = "") -> dict: """Create a custom PRIVATE activity visible only to your account. Free (0 credits). Args: activity_name: Name for the new activity (max 64 characters). description: Optional description of the activity. """ payload: dict = {"activity_name": activity_name} if description: payload["description"] = description with _client() as client: response = client.post("/activities", json=payload) return response.json()