list_time_entries
Retrieve time entries from FreshBooks for tracking work hours, managing projects, and billing clients. Use pagination parameters to navigate through records efficiently.
Instructions
List time entries.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| per_page | No |
Implementation Reference
- src/mcp_freshbooks/server.py:355-376 (handler)The list_time_entries handler function which uses the client to fetch time entries from the projects API.
@mcp.tool() @_handle_errors async def list_time_entries( page: int = 1, per_page: int = 25, ) -> str: """List time entries.""" result = await client.projects_list("time_entries", page, per_page) entries = result.get("time_entries", []) lines = [f"Found {len(entries)} time entries\n"] for e in entries: dur = e.get("duration", 0) hours = dur // 3600 mins = (dur % 3600) // 60 lines.append( f"ID: {e.get('id')} | {hours}h{mins}m | " f"project: {e.get('project_id', '-')} | " f"client: {e.get('client_id', '-')} | " f"date: {e.get('started_at', '')[:10]} | " f"note: {e.get('note', '')[:50]}" ) return "\n".join(lines)