@goodsamsoftware/freshbooks-mcp 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +357 -357
  3. package/dist/tools/client/client-create.js +38 -38
  4. package/dist/tools/client/client-list.js +47 -47
  5. package/dist/tools/client/client-update.js +34 -34
  6. package/dist/tools/credit-note/creditnote-single.js +18 -18
  7. package/dist/tools/expense/expense-update.d.ts.map +1 -1
  8. package/dist/tools/expense/expense-update.js +4 -4
  9. package/dist/tools/expense/expense-update.js.map +1 -1
  10. package/dist/tools/invoice/invoice-list.js +40 -40
  11. package/dist/tools/project/project-create.js +34 -34
  12. package/dist/tools/project/project-delete.js +38 -38
  13. package/dist/tools/project/project-list.js +38 -38
  14. package/dist/tools/project/project-single.js +23 -23
  15. package/dist/tools/project/project-update.js +37 -37
  16. package/dist/tools/task/task-create.js +36 -36
  17. package/dist/tools/task/task-delete.js +35 -35
  18. package/dist/tools/task/task-list.js +28 -28
  19. package/dist/tools/task/task-single.js +25 -25
  20. package/dist/tools/task/task-update.js +39 -39
  21. package/dist/tools/time-entry/timeentry-create.js +49 -49
  22. package/dist/tools/time-entry/timeentry-delete.js +48 -48
  23. package/dist/tools/time-entry/timeentry-list.js +53 -53
  24. package/dist/tools/time-entry/timeentry-single.js +28 -28
  25. package/dist/tools/time-entry/timeentry-update.js +61 -61
  26. package/dist/tools/timer/timer-current.js +54 -54
  27. package/dist/tools/timer/timer-discard.js +41 -41
  28. package/dist/tools/timer/timer-start.js +43 -43
  29. package/dist/tools/timer/timer-stop.js +33 -33
  30. package/package.json +88 -88
@@ -11,44 +11,44 @@ import { buildQueryBuilders } from "../base-tool.js";
11
11
  */
12
12
  export const projectListTool = {
13
13
  name: "project_list",
14
- description: `List projects from FreshBooks with optional filtering and pagination.
15
-
16
- WHEN TO USE:
17
- - User asks to "see projects", "list projects", "show all projects"
18
- - User wants to find a project by name or client
19
- - User needs project information for time tracking context
20
-
21
- FILTERING OPTIONS:
22
- - clientId: Filter by specific client
23
- - active: Show only active/inactive projects
24
- - complete: Show only complete/incomplete projects
25
- - internal: Show only internal/billable projects
26
- - title: Search by project name (partial match)
27
-
28
- SORTING:
29
- - sortBy: Field to sort by (title, created_at, due_date)
30
- - sortOrder: Sort direction (asc or desc, default: desc)
31
-
32
- INCLUDES:
33
- - include: Related data to fetch (client, services, group)
34
- - client: Client details associated with the project
35
- - services: Service/billing rate configurations
36
- - group: Project group for organization
37
-
38
- PAGINATION:
39
- - Use page/perPage for large result sets
40
- - Default: 30 results per page
41
- - Maximum: 100 results per page
42
-
43
- EXAMPLE PROMPTS:
44
- - "Show me all active projects"
45
- - "List projects for client ABC123"
46
- - "Find projects with 'Website' in the title"
47
- - "Show incomplete projects sorted by due date"
48
- - "Get projects with client details included"
49
-
50
- RETURNS:
51
- Array of projects with titles, clients, billing info, and time logged.
14
+ description: `List projects from FreshBooks with optional filtering and pagination.
15
+
16
+ WHEN TO USE:
17
+ - User asks to "see projects", "list projects", "show all projects"
18
+ - User wants to find a project by name or client
19
+ - User needs project information for time tracking context
20
+
21
+ FILTERING OPTIONS:
22
+ - clientId: Filter by specific client
23
+ - active: Show only active/inactive projects
24
+ - complete: Show only complete/incomplete projects
25
+ - internal: Show only internal/billable projects
26
+ - title: Search by project name (partial match)
27
+
28
+ SORTING:
29
+ - sortBy: Field to sort by (title, created_at, due_date)
30
+ - sortOrder: Sort direction (asc or desc, default: desc)
31
+
32
+ INCLUDES:
33
+ - include: Related data to fetch (client, services, group)
34
+ - client: Client details associated with the project
35
+ - services: Service/billing rate configurations
36
+ - group: Project group for organization
37
+
38
+ PAGINATION:
39
+ - Use page/perPage for large result sets
40
+ - Default: 30 results per page
41
+ - Maximum: 100 results per page
42
+
43
+ EXAMPLE PROMPTS:
44
+ - "Show me all active projects"
45
+ - "List projects for client ABC123"
46
+ - "Find projects with 'Website' in the title"
47
+ - "Show incomplete projects sorted by due date"
48
+ - "Get projects with client details included"
49
+
50
+ RETURNS:
51
+ Array of projects with titles, clients, billing info, and time logged.
52
52
  Includes pagination metadata for navigating large result sets.`,
53
53
  inputSchema: ProjectListInputSchema,
54
54
  outputSchema: ProjectListOutputSchema,
@@ -10,29 +10,29 @@ import { ErrorHandler } from "../../errors/error-handler.js";
10
10
  */
11
11
  export const projectSingleTool = {
12
12
  name: "project_single",
13
- description: `Get detailed information about a specific project by ID.
14
-
15
- WHEN TO USE:
16
- - User asks for details about a specific project
17
- - User provides a project ID or name from a previous list
18
- - Need full project information including rates and billing settings
19
-
20
- REQUIRED INFO:
21
- - Project ID (numeric)
22
- - Account ID (get from context or user)
23
-
24
- OPTIONAL INCLUDES:
25
- - client: Include full client details
26
- - services: Include associated service definitions
27
- - group: Include project group information
28
-
29
- EXAMPLE PROMPTS:
30
- - "Show me details for project 12345"
31
- - "Get information about the Website Redesign project"
32
- - "What's the billing method for project 98765?"
33
-
34
- RETURNS:
35
- Complete project details including title, description, client, billing method,
13
+ description: `Get detailed information about a specific project by ID.
14
+
15
+ WHEN TO USE:
16
+ - User asks for details about a specific project
17
+ - User provides a project ID or name from a previous list
18
+ - Need full project information including rates and billing settings
19
+
20
+ REQUIRED INFO:
21
+ - Project ID (numeric)
22
+ - Account ID (get from context or user)
23
+
24
+ OPTIONAL INCLUDES:
25
+ - client: Include full client details
26
+ - services: Include associated service definitions
27
+ - group: Include project group information
28
+
29
+ EXAMPLE PROMPTS:
30
+ - "Show me details for project 12345"
31
+ - "Get information about the Website Redesign project"
32
+ - "What's the billing method for project 98765?"
33
+
34
+ RETURNS:
35
+ Complete project details including title, description, client, billing method,
36
36
  rates, time logged, completion status, and financial totals.`,
37
37
  inputSchema: ProjectSingleInputSchema,
38
38
  outputSchema: ProjectSingleOutputSchema,
@@ -10,43 +10,43 @@ import { ErrorHandler } from "../../errors/error-handler.js";
10
10
  */
11
11
  export const projectUpdateTool = {
12
12
  name: "project_update",
13
- description: `Update an existing project in FreshBooks.
14
-
15
- WHEN TO USE:
16
- - User wants to modify project details
17
- - User says "update project", "change project", "mark project complete"
18
- - Adjusting billing rates, due dates, or status
19
-
20
- REQUIRED INFO:
21
- - projectId: Which project to update (numeric)
22
- - accountId: FreshBooks account (get from context)
23
-
24
- UPDATABLE FIELDS:
25
- - title: Change project name
26
- - description: Update project description
27
- - dueDate: Change completion deadline (ISO 8601)
28
- - clientId: Reassign to different client
29
- - billingMethod: Change how project is billed
30
- - rate: Update hourly rate
31
- - fixedPrice: Change fixed price amount
32
- - budget: Adjust project budget
33
- - active: Activate or deactivate project
34
- - complete: Mark project as complete/incomplete
35
- - internal: Change billable status
36
-
37
- STATUS CHANGES:
38
- - Set active=false to pause project (stops appearing in active lists)
39
- - Set complete=true to mark project done
40
- - Both can be combined for archival
41
-
42
- EXAMPLE PROMPTS:
43
- - "Mark project 12345 as complete"
44
- - "Update project Website Redesign to increase rate to $150/hr"
45
- - "Change project 98765 due date to next Friday"
46
- - "Deactivate project Mobile App"
47
-
48
- RETURNS:
49
- Updated project with all current settings. Changes take effect immediately
13
+ description: `Update an existing project in FreshBooks.
14
+
15
+ WHEN TO USE:
16
+ - User wants to modify project details
17
+ - User says "update project", "change project", "mark project complete"
18
+ - Adjusting billing rates, due dates, or status
19
+
20
+ REQUIRED INFO:
21
+ - projectId: Which project to update (numeric)
22
+ - accountId: FreshBooks account (get from context)
23
+
24
+ UPDATABLE FIELDS:
25
+ - title: Change project name
26
+ - description: Update project description
27
+ - dueDate: Change completion deadline (ISO 8601)
28
+ - clientId: Reassign to different client
29
+ - billingMethod: Change how project is billed
30
+ - rate: Update hourly rate
31
+ - fixedPrice: Change fixed price amount
32
+ - budget: Adjust project budget
33
+ - active: Activate or deactivate project
34
+ - complete: Mark project as complete/incomplete
35
+ - internal: Change billable status
36
+
37
+ STATUS CHANGES:
38
+ - Set active=false to pause project (stops appearing in active lists)
39
+ - Set complete=true to mark project done
40
+ - Both can be combined for archival
41
+
42
+ EXAMPLE PROMPTS:
43
+ - "Mark project 12345 as complete"
44
+ - "Update project Website Redesign to increase rate to $150/hr"
45
+ - "Change project 98765 due date to next Friday"
46
+ - "Deactivate project Mobile App"
47
+
48
+ RETURNS:
49
+ Updated project with all current settings. Changes take effect immediately
50
50
  for new time entries.`,
51
51
  inputSchema: ProjectUpdateInputSchema,
52
52
  outputSchema: ProjectSingleOutputSchema,
@@ -10,42 +10,42 @@ import { ErrorHandler } from '../../errors/error-handler.js';
10
10
  */
11
11
  export const taskCreateTool = {
12
12
  name: 'task_create',
13
- description: `Create a new task in FreshBooks.
14
-
15
- WHEN TO USE:
16
- - User needs a new task category
17
- - Setting up task breakdown for a project
18
- - Creating specialized tracking categories
19
- - Organizing work into billable tasks
20
-
21
- REQUIRED INFO:
22
- - accountId: FreshBooks account ID
23
- - name: Task name (descriptive label)
24
-
25
- OPTIONAL PARAMETERS:
26
- - description: Detailed task description
27
- - billable: Whether task is billable (default: true)
28
- - rate: Task-specific billing rate
29
- - amount: Decimal string (e.g., "50.00")
30
- - code: Currency code (default: USD)
31
-
32
- RETURNS:
33
- Created task with:
34
- - Task ID (for use in time entries)
35
- - Name, description
36
- - Billable status and rate
37
- - Visibility state
38
-
39
- EXAMPLE PROMPTS:
40
- - "Create a task called Code Review"
41
- - "Add a new billable task for Testing"
42
- - "Set up a task for Documentation at $45/hour"
43
- - "Create a non-billable task for Internal Meetings"
44
-
45
- BEST PRACTICES:
46
- - Use clear, specific task names
47
- - Set appropriate rates for different task types
48
- - Create non-billable tasks for internal work
13
+ description: `Create a new task in FreshBooks.
14
+
15
+ WHEN TO USE:
16
+ - User needs a new task category
17
+ - Setting up task breakdown for a project
18
+ - Creating specialized tracking categories
19
+ - Organizing work into billable tasks
20
+
21
+ REQUIRED INFO:
22
+ - accountId: FreshBooks account ID
23
+ - name: Task name (descriptive label)
24
+
25
+ OPTIONAL PARAMETERS:
26
+ - description: Detailed task description
27
+ - billable: Whether task is billable (default: true)
28
+ - rate: Task-specific billing rate
29
+ - amount: Decimal string (e.g., "50.00")
30
+ - code: Currency code (default: USD)
31
+
32
+ RETURNS:
33
+ Created task with:
34
+ - Task ID (for use in time entries)
35
+ - Name, description
36
+ - Billable status and rate
37
+ - Visibility state
38
+
39
+ EXAMPLE PROMPTS:
40
+ - "Create a task called Code Review"
41
+ - "Add a new billable task for Testing"
42
+ - "Set up a task for Documentation at $45/hour"
43
+ - "Create a non-billable task for Internal Meetings"
44
+
45
+ BEST PRACTICES:
46
+ - Use clear, specific task names
47
+ - Set appropriate rates for different task types
48
+ - Create non-billable tasks for internal work
49
49
  - Add descriptions to clarify task purpose`,
50
50
  inputSchema: TaskCreateInputSchema,
51
51
  outputSchema: TaskSchema,
@@ -11,41 +11,41 @@ import { ErrorHandler } from '../../errors/error-handler.js';
11
11
  */
12
12
  export const taskDeleteTool = {
13
13
  name: 'task_delete',
14
- description: `Delete a task from FreshBooks.
15
-
16
- WHEN TO USE:
17
- - Need to permanently remove a task
18
- - Cleaning up test/duplicate tasks
19
- - Removing incorrectly created tasks
20
-
21
- REQUIRED INFO:
22
- - accountId: FreshBooks account ID
23
- - taskId: Task ID (numeric identifier)
24
-
25
- IMPORTANT WARNINGS:
26
- - This is PERMANENT and IRREVERSIBLE
27
- - Cannot recover deleted tasks
28
- - Consider using task_update with visState=1 to archive instead
29
- - Deleted tasks cannot be used in new time entries
30
- - Existing time entries with this task will retain the reference
31
-
32
- RETURNS:
33
- Success confirmation:
34
- - success: true if deleted
35
- - message: Confirmation message
36
-
37
- EXAMPLE PROMPTS:
38
- - "Delete task 12345"
39
- - "Remove task ID 789"
40
- - "Permanently delete the Testing task"
41
-
42
- BEST PRACTICE:
43
- ⚠️ ARCHIVE INSTEAD: Use task_update with visState=1 to soft-delete tasks.
44
- This preserves data integrity while hiding the task from active lists.
45
-
46
- DELETE ONLY IF:
47
- - Task was created by mistake
48
- - Task has no time entries associated
14
+ description: `Delete a task from FreshBooks.
15
+
16
+ WHEN TO USE:
17
+ - Need to permanently remove a task
18
+ - Cleaning up test/duplicate tasks
19
+ - Removing incorrectly created tasks
20
+
21
+ REQUIRED INFO:
22
+ - accountId: FreshBooks account ID
23
+ - taskId: Task ID (numeric identifier)
24
+
25
+ IMPORTANT WARNINGS:
26
+ - This is PERMANENT and IRREVERSIBLE
27
+ - Cannot recover deleted tasks
28
+ - Consider using task_update with visState=1 to archive instead
29
+ - Deleted tasks cannot be used in new time entries
30
+ - Existing time entries with this task will retain the reference
31
+
32
+ RETURNS:
33
+ Success confirmation:
34
+ - success: true if deleted
35
+ - message: Confirmation message
36
+
37
+ EXAMPLE PROMPTS:
38
+ - "Delete task 12345"
39
+ - "Remove task ID 789"
40
+ - "Permanently delete the Testing task"
41
+
42
+ BEST PRACTICE:
43
+ ⚠️ ARCHIVE INSTEAD: Use task_update with visState=1 to soft-delete tasks.
44
+ This preserves data integrity while hiding the task from active lists.
45
+
46
+ DELETE ONLY IF:
47
+ - Task was created by mistake
48
+ - Task has no time entries associated
49
49
  - You're absolutely certain it should be removed`,
50
50
  inputSchema: TaskDeleteInputSchema,
51
51
  outputSchema: DeleteSuccessSchema,
@@ -14,34 +14,34 @@ const InputSchema = AccountIdSchema.extend({
14
14
  */
15
15
  export const taskListTool = {
16
16
  name: 'task_list',
17
- description: `List tasks from FreshBooks.
18
-
19
- WHEN TO USE:
20
- - User wants to see project tasks
21
- - Need to find a task ID for time entry
22
- - Browse available task categories
23
- - Review task organization
24
-
25
- REQUIRED INFO:
26
- - accountId: FreshBooks account ID
27
-
28
- OPTIONAL PARAMETERS:
29
- - page: Page number for pagination (default: 1)
30
- - perPage: Results per page (default: 30, max: 100)
31
-
32
- RETURNS:
33
- Array of tasks with:
34
- - Task ID, name, description
35
- - Billable status and rate
36
- - Visibility state (active/archived)
37
- - Pagination metadata
38
-
39
- EXAMPLE PROMPTS:
40
- - "Show me all tasks"
41
- - "List project tasks"
42
- - "What tasks can I assign time to?"
43
- - "Get all billable tasks"
44
-
17
+ description: `List tasks from FreshBooks.
18
+
19
+ WHEN TO USE:
20
+ - User wants to see project tasks
21
+ - Need to find a task ID for time entry
22
+ - Browse available task categories
23
+ - Review task organization
24
+
25
+ REQUIRED INFO:
26
+ - accountId: FreshBooks account ID
27
+
28
+ OPTIONAL PARAMETERS:
29
+ - page: Page number for pagination (default: 1)
30
+ - perPage: Results per page (default: 30, max: 100)
31
+
32
+ RETURNS:
33
+ Array of tasks with:
34
+ - Task ID, name, description
35
+ - Billable status and rate
36
+ - Visibility state (active/archived)
37
+ - Pagination metadata
38
+
39
+ EXAMPLE PROMPTS:
40
+ - "Show me all tasks"
41
+ - "List project tasks"
42
+ - "What tasks can I assign time to?"
43
+ - "Get all billable tasks"
44
+
45
45
  NOTE: Tasks can have alternate field names (name/tname, description/tdesc) in the API.`,
46
46
  inputSchema: InputSchema,
47
47
  outputSchema: TaskListOutputSchema,
@@ -10,31 +10,31 @@ import { ErrorHandler } from '../../errors/error-handler.js';
10
10
  */
11
11
  export const taskSingleTool = {
12
12
  name: 'task_single',
13
- description: `Get a single task by ID from FreshBooks.
14
-
15
- WHEN TO USE:
16
- - Need detailed information about a specific task
17
- - Verify task settings before using
18
- - Check task rate and billable status
19
- - Confirm task exists
20
-
21
- REQUIRED INFO:
22
- - accountId: FreshBooks account ID
23
- - taskId: Task ID (numeric identifier)
24
-
25
- RETURNS:
26
- Complete task details including:
27
- - Task ID, name, description
28
- - Billable status and rate
29
- - Visibility state
30
- - Last update timestamp
31
-
32
- EXAMPLE PROMPTS:
33
- - "Get details for task 12345"
34
- - "Show me task information for ID 789"
35
- - "What is task 456 used for?"
36
- - "Check if task 123 is billable"
37
-
13
+ description: `Get a single task by ID from FreshBooks.
14
+
15
+ WHEN TO USE:
16
+ - Need detailed information about a specific task
17
+ - Verify task settings before using
18
+ - Check task rate and billable status
19
+ - Confirm task exists
20
+
21
+ REQUIRED INFO:
22
+ - accountId: FreshBooks account ID
23
+ - taskId: Task ID (numeric identifier)
24
+
25
+ RETURNS:
26
+ Complete task details including:
27
+ - Task ID, name, description
28
+ - Billable status and rate
29
+ - Visibility state
30
+ - Last update timestamp
31
+
32
+ EXAMPLE PROMPTS:
33
+ - "Get details for task 12345"
34
+ - "Show me task information for ID 789"
35
+ - "What is task 456 used for?"
36
+ - "Check if task 123 is billable"
37
+
38
38
  NOTE: Task names may appear in either 'name' or 'tname' field due to API variations.`,
39
39
  inputSchema: TaskSingleInputSchema,
40
40
  outputSchema: TaskSchema,
@@ -10,45 +10,45 @@ import { ErrorHandler } from '../../errors/error-handler.js';
10
10
  */
11
11
  export const taskUpdateTool = {
12
12
  name: 'task_update',
13
- description: `Update an existing task in FreshBooks.
14
-
15
- WHEN TO USE:
16
- - Need to change task name or description
17
- - Update billing rate for a task
18
- - Change billable status
19
- - Archive a task (set visState)
20
-
21
- REQUIRED INFO:
22
- - accountId: FreshBooks account ID
23
- - taskId: Task ID (numeric identifier)
24
-
25
- OPTIONAL PARAMETERS (at least one required):
26
- - name: Updated task name
27
- - description: Updated task description
28
- - billable: Updated billable status
29
- - rate: Updated billing rate
30
- - amount: Decimal string (e.g., "60.00")
31
- - code: Currency code
32
- - visState: Visibility state (0=active, 1=deleted, 2=archived)
33
-
34
- RETURNS:
35
- Updated task with:
36
- - Task ID (unchanged)
37
- - New name, description, rate
38
- - Updated billable status
39
- - Updated visibility state
40
-
41
- EXAMPLE PROMPTS:
42
- - "Update task 123 to be non-billable"
43
- - "Change task 456 name to Development Work"
44
- - "Set task 789 rate to $85/hour"
45
- - "Archive task 234"
46
- - "Update task 567 description to include meetings"
47
-
48
- BEST PRACTICES:
49
- - Use visState to archive rather than delete
50
- - Update rates when billing changes
51
- - Keep task names and descriptions current
13
+ description: `Update an existing task in FreshBooks.
14
+
15
+ WHEN TO USE:
16
+ - Need to change task name or description
17
+ - Update billing rate for a task
18
+ - Change billable status
19
+ - Archive a task (set visState)
20
+
21
+ REQUIRED INFO:
22
+ - accountId: FreshBooks account ID
23
+ - taskId: Task ID (numeric identifier)
24
+
25
+ OPTIONAL PARAMETERS (at least one required):
26
+ - name: Updated task name
27
+ - description: Updated task description
28
+ - billable: Updated billable status
29
+ - rate: Updated billing rate
30
+ - amount: Decimal string (e.g., "60.00")
31
+ - code: Currency code
32
+ - visState: Visibility state (0=active, 1=deleted, 2=archived)
33
+
34
+ RETURNS:
35
+ Updated task with:
36
+ - Task ID (unchanged)
37
+ - New name, description, rate
38
+ - Updated billable status
39
+ - Updated visibility state
40
+
41
+ EXAMPLE PROMPTS:
42
+ - "Update task 123 to be non-billable"
43
+ - "Change task 456 name to Development Work"
44
+ - "Set task 789 rate to $85/hour"
45
+ - "Archive task 234"
46
+ - "Update task 567 description to include meetings"
47
+
48
+ BEST PRACTICES:
49
+ - Use visState to archive rather than delete
50
+ - Update rates when billing changes
51
+ - Keep task names and descriptions current
52
52
  - Mark internal tasks as non-billable`,
53
53
  inputSchema: TaskUpdateInputSchema,
54
54
  outputSchema: TaskSchema,