timecard_get_projects
Retrieve available projects from TimeCard MCP to manage timesheet entries, enabling selection of project IDs for activity lookup and hour tracking.
Instructions
Get list of available projects. Returns project id and name.
Use the project id with timecard_get_activities to get activity options, and with timecard_save to set entries.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/data-tools.ts:18-38 (handler)The handler for the timecard_get_projects tool, which fetches available project options using the provided TimeCardSession.
handler: async (args, session: TimeCardSession) => { const authResult = await session.ensureAuthenticated(); if (!authResult.success) { throw new Error(authResult.message); } try { const projects = await session.getProjectOptions(); return { projects: projects.map(p => ({ id: p.id, name: p.name, description: p.name })), count: projects.length }; } catch (error) { throw new Error(`Failed to get projects: ${error instanceof Error ? error.message : 'Unknown error'}`); } } - src/tools/data-tools.ts:260-260 (registration)Registration of the timecard_get_projects tool in the dataTools array.
timecardGetProjects, - src/tools/data-tools.ts:14-17 (schema)Input schema definition for timecard_get_projects.
inputSchema: { type: 'object', properties: {} },