Skip to main content
Glama

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
NameRequiredDescriptionDefault
activity_nameYes
descriptionNo

Implementation Reference

  • 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()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thunderrabbit/jikan'

If you have feedback or need assistance with the MCP directory API, please join our Discord server