list_trackers
Display available productivity trackers with their context types and current status to help organize tasks and ideas efficiently.
Instructions
List available trackers with their context types and status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Filter by context type (business, personal, project, system) |
Implementation Reference
- src/index.ts:253-314 (handler)The handler function that executes the list_trackers tool. It lists available trackers from the capture engine's tracker manager, optionally filtered by the provided context argument, and returns a formatted text response./** * Handle list_trackers tool requests */ async function handleListTrackers(args: any): Promise<CallToolResult> { try { await initializeCaptureEngine(); if (!captureEngine) { throw new Error('Failed to initialize capture engine'); } // Get all trackers through the capture engine's tracker manager const trackers = captureEngine['trackerManager']?.getTrackersByContext() || []; let filteredTrackers = trackers; if (args.context) { filteredTrackers = trackers.filter((tracker: any) => tracker.frontmatter.contextType === args.context ); } const trackerLines = [ 'π Available Trackers', '', ]; if (filteredTrackers.length === 0) { trackerLines.push('No trackers found matching criteria.'); } else { filteredTrackers.forEach((tracker: any) => { const context = tracker.frontmatter.contextType || 'undefined'; const mode = tracker.frontmatter.mode || 'standard'; trackerLines.push(`π ${tracker.frontmatter.tag} (${tracker.frontmatter.friendlyName})`); trackerLines.push(` Context: ${context} | Mode: ${mode}`); if (tracker.frontmatter.collection) { trackerLines.push(` Collection: ${tracker.frontmatter.collection}`); } trackerLines.push(''); }); } return { content: [ { type: 'text', text: trackerLines.join('\n'), }, ], isError: false, }; } catch (error) { return { content: [ { type: 'text', text: `Error listing trackers: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/index.ts:68-80 (registration)Registration of the list_trackers tool in the TOOLS array, including its name, description, and input schema. This array is returned by the list tools handler.{ name: 'list_trackers', description: 'List available trackers with their context types and status', inputSchema: { type: 'object', properties: { context: { type: 'string', description: 'Filter by context type (business, personal, project, system)', }, }, }, },
- src/index.ts:71-79 (schema)Input schema defining the optional 'context' parameter for filtering trackers.inputSchema: { type: 'object', properties: { context: { type: 'string', description: 'Filter by context type (business, personal, project, system)', }, }, },
- src/index.ts:344-345 (registration)Switch case in the tool call request handler that routes list_trackers calls to the handler function.case 'list_trackers': return await handleListTrackers(args);