Skip to main content
Glama

update_activity_log

Modify existing activity logs in Chronos Protocol to track progress, update task details, and maintain traceability for AI coding sessions.

Instructions

Update an existing activity log

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesUnique identifier of the activity log to update
activityTypeNoUpdated activity type
descriptionNoUpdated description
notesNoUpdated traceability notes for session continuity and auditability. Document progress, changes in approach, new findings, or corrections made. Include specific details about what was modified, why changes were needed, and any insights gained. This ensures other AI agents can follow your thought process, understand context, and continue work seamlessly without losing critical information.
resultNoUpdated result
tagsNoUpdated tags
task_scopeNoUpdated task scope

Implementation Reference

  • Core handler function in TimeServer class that validates the activity log exists, filters and processes updates (handling TaskScope enums and None values), persists the update via database, retrieves the updated data, and returns an ActivityLog model instance.
    def update_activity_log(self, activity_id: str, updates: Dict[str, Any]) -> ActivityLog:
        """Update an existing activity log"""
        log_data = self.db.get_activity_log(activity_id)
        if not log_data:
            raise ValueError(f"Activity log with ID {activity_id} not found")
        
        # Filter out None values and convert enum values to strings
        filtered_updates = {}
        for key, value in updates.items():
            if value is not None:
                if isinstance(value, TaskScope):
                    filtered_updates[key] = value.value
                else:
                    filtered_updates[key] = value
        
        self.db.update_activity_log(activity_id, filtered_updates)
    
        # Return updated log
        updated_log_data = self.db.get_activity_log(activity_id)
        return ActivityLog(**updated_log_data)
  • Tool registration within the @server.list_tools() handler, defining the tool name, description, and detailed input schema including all updatable fields with descriptions.
    Tool(
        name=TimeTools.UPDATE_ACTIVITY_LOG.value,
        description="Update an existing activity log",
        inputSchema={
            "type": "object",
            "properties": {
                "activityId": {
                    "type": "string",
                    "description": "Unique identifier of the activity log to update",
                },
                "activityType": {
                    "type": "string",
                    "description": "Updated activity type",
                },
                "task_scope": {
                    "type": "string",
                    "enum": [scope.value for scope in TaskScope],
                    "description": "Updated task scope",
                },
                "description": {
                    "type": "string",
                    "description": "Updated description",
                },
                "tags": {
                    "type": "array",
                    "items": {"type": "string"},
                    "description": "Updated tags",
                },
                "result": {
                    "type": "string",
                    "description": "Updated result",
                },
                "notes": {
                    "type": "string",
                    "description": "Updated traceability notes for session continuity and auditability. Document progress, changes in approach, new findings, or corrections made. Include specific details about what was modified, why changes were needed, and any insights gained. This ensures other AI agents can follow your thought process, understand context, and continue work seamlessly without losing critical information.",
                },
            },
            "required": ["activityId"],
        },
    ),
  • Dispatch handler in _execute_tool that validates activityId argument, constructs updates dict from input args, and invokes the TimeServer handler.
    case TimeTools.UPDATE_ACTIVITY_LOG.value:
        activity_id = arguments.get("activityId")
        if not activity_id:
            raise ValueError("Missing required argument: activityId")
    
        updates = {}
        for key in ["activityType", "task_scope", "description", "tags", "result", "notes"]:
            if key in arguments:
                updates[key] = arguments[key]
    
        result = time_server.update_activity_log(activity_id, updates)
  • Database storage helper that finds the activity log by ID, applies updates in-place to the JSON data structure, saves to file, and returns success boolean.
    def update_activity_log(self, activity_id: str, updates: Dict[str, Any]):
        """Update an existing activity log"""
        for log in self.activity_logs:
            if log.get('activityId') == activity_id:
                log.update(updates)
                self.save_data()
                return True
        return False
  • Pydantic model defining the structure and types for activity log entries, used for input validation, serialization, and return type of the update handler.
    class ActivityLog(BaseModel):
        activityId: str  # Changed from timeId for better naming
        activityType: str
        task_scope: TaskScope
        description: Optional[str] = None
        tags: Optional[List[str]] = None
        startTime: str
        endTime: Optional[str] = None
        duration: Optional[str] = None
        durationSeconds: Optional[int] = None
        result: Optional[str] = None
        notes: Optional[str] = None
        status: str  # "started", "completed"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. 'Update' implies a mutation, but it doesn't disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified fields. The description lacks critical context for safe and effective use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for the tool's purpose, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral risks, output expectations, or usage context. The high parameter count and lack of structured support require more descriptive guidance to ensure safe and correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 7 parameters. The description adds no meaning beyond the schema—it doesn't explain parameter interactions, default behaviors, or usage examples. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing activity log' clearly states the verb (update) and resource (activity log), but it's vague about what specifically gets updated. It doesn't differentiate from sibling tools like 'end_activity_log' which might also modify activity logs, nor does it specify the scope of updates beyond the generic term.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing activity log), compare to siblings like 'create_time_reminder' or 'end_activity_log', or specify scenarios where updates are appropriate versus creating new logs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/n0zer0d4y/chronos-protocol'

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