Skip to main content
Glama

create_time_entry

Create time entries in FreshBooks to track billable hours for clients and projects. Specify start time, duration, and optional details like notes.

Instructions

Create a time entry. started_at as ISO8601 (e.g. '2026-03-20T09:00:00'). Duration in seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
started_atYes
duration_secondsYes
client_idNo
project_idNo
noteNo
billableNo

Implementation Reference

  • The implementation of the create_time_entry MCP tool, which creates a new time entry in FreshBooks.
    async def create_time_entry(
        started_at: str,
        duration_seconds: int,
        client_id: int | None = None,
        project_id: int | None = None,
        note: str = "",
        billable: bool = True,
    ) -> str:
        """Create a time entry. started_at as ISO8601 (e.g. '2026-03-20T09:00:00'). Duration in seconds."""
        data = {
            "started_at": started_at,
            "duration": duration_seconds,
            "is_logged": True,
            "billable": billable,
        }
        if client_id:
            data["client_id"] = client_id
        if project_id:
            data["project_id"] = project_id
        if note:
            data["note"] = note
        result = await client.projects_create("time_entries", "time_entry", data)
        te = result.get("time_entry", result)
        hours = duration_seconds // 3600
        mins = (duration_seconds % 3600) // 60
        return f"Time entry created (ID: {te.get('id')}). Duration: {hours}h{mins}m"

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/AlexlaGuardia/MCP-Freshbooks'

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