get_brian_only_projects
Retrieve Todoist projects owned exclusively by Brian that are not shared with other users.
Instructions
Get projects that belong only to Brian and are NOT shared
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/projects.ts:117-148 (handler)Full tool definition for 'get_brian_only_projects' including inline schema and the handler function that calls the core getBrianOnlyProjects service and formats the response as JSON text content.export const getBrianOnlyProjectsTool: Tool = { schema: { name: 'get_brian_only_projects', description: 'Get projects that belong only to Brian and are NOT shared', inputSchema: { type: 'object', properties: {}, required: [], }, }, handler: async () => { console.error('Executing get_brian_only_projects...'); try { const result = await getBrianOnlyProjects(); console.error('get_brian_only_projects completed successfully'); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { throw new Error( `Failed to get Brian-only projects: ${ error instanceof Error ? error.message : 'Unknown error' }` ); } }, };
- Core helper function that lists all projects, filters for Brian-only projects using isBrianOnlyProject predicate, and returns structured ProjectsResponse.export async function getBrianOnlyProjects(): Promise<ProjectsResponse> { try { const allProjects = await listProjects(); const filteredProjects = allProjects.projects.filter(isBrianOnlyProject); return { projects: filteredProjects, total_count: filteredProjects.length, }; } catch (error) { throw new Error( `Failed to get Brian-only projects: ${getErrorMessage(error)}` ); } }
- src/handlers/tool-request-handler.ts:66-87 (registration)Registers the handler for 'get_brian_only_projects' (and other no-arg tools) in the toolsWithoutArgs map used by handleToolRequest.const toolsWithoutArgs: Record<string, () => Promise<ToolResponse>> = { list_personal_inbox_tasks: listPersonalInboxTasksTool.handler, list_brian_inbox_per_becky_tasks: listBrianInboxPerBeckyTasksTool.handler, list_becky_inbox_per_brian_tasks: listBeckyInboxPerBrianTasksTool.handler, list_next_actions: listNextActionsTool.handler, get_brian_only_projects: getBrianOnlyProjectsTool.handler, get_brian_shared_projects: getBrianSharedProjectsTool.handler, get_becky_shared_projects: getBeckySharedProjectsTool.handler, get_inbox_projects: getInboxProjectsTool.handler, get_context_labels: getContextLabelsTool.handler, get_chores_due_today: getChoresDueTodayTool.handler, get_tasks_due_tomorrow: getTasksDueTomorrowTool.handler, get_tasks_due_this_week: getTasksDueThisWeekTool.handler, get_tickler_tasks: getTicklerTasksTool.handler, list_gtd_projects: listGtdProjectsTool.handler, get_waiting_tasks: getWaitingTasksTool.handler, get_recent_media: getRecentMediaTool.handler, get_areas_of_focus: getAreasOfFocusTool.handler, get_shopping_list: getShoppingListTool.handler, list_brian_time_sensitive_tasks: listBrianTimeSensitiveTasksTool.handler, list_becky_time_sensitive_tasks: listBeckyTimeSensitiveTasksTool.handler, };
- src/handlers/tool-request-handler.ts:8-8 (registration)Imports the getBrianOnlyProjectsTool for use in registration.getBrianOnlyProjectsTool,