get_project_status
Check the status of a Trace MCP project to view configuration, cache state, and validation results for detecting schema mismatches.
Instructions
Get the status of a trace project including config, cache state, and last validation result.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectDir | Yes | Root directory with .trace-mcp config |
Implementation Reference
- src/index.ts:693-740 (handler)Handler for the get_project_status tool. Parses input, loads the project using loadProject, checks existence, retrieves config and watcher status, and returns JSON status.case 'get_project_status': { const input = GetProjectStatusInput.parse(args); log(`Getting project status for: ${input.projectDir}`); const project = loadProject(input.projectDir); if (!project.exists()) { return { content: [{ type: 'text', text: JSON.stringify({ success: false, exists: false, error: `No trace project found at ${input.projectDir}`, }, null, 2), }], }; } const config = project.config; const activeWatchers = listActiveWatchers(); const isWatching = activeWatchers.includes(project.rootDir); let watcherStatus = null; if (isWatching) { const watcher = getWatcher(project); watcherStatus = watcher.getStatus(); } return { content: [{ type: 'text', text: JSON.stringify({ success: true, exists: true, projectDir: project.rootDir, traceDir: project.traceDir, config, isWatching, watcherStatus, paths: { producer: project.producerPath, consumer: project.consumerPath, }, }, null, 2), }], }; }
- src/index.ts:109-111 (schema)Zod schema defining the input for get_project_status: requires projectDir string.const GetProjectStatusInput = z.object({ projectDir: z.string().describe('Root directory with .trace-mcp config'), });
- src/index.ts:264-274 (registration)Tool registration in listTools response, including name, description, and inputSchema matching the Zod schema.{ name: 'get_project_status', description: 'Get the status of a trace project including config, cache state, and last validation result.', inputSchema: { type: 'object', properties: { projectDir: { type: 'string', description: 'Root directory with .trace-mcp config' }, }, required: ['projectDir'], }, },