reload_project
Invalidate cached TypeScript project state and reload configuration from tsconfig to ensure accurate code analysis and navigation.
Instructions
Invalidate cached TypeScript project state and reload it from tsconfig.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| workspaceRoot | No | ||
| projectTsconfigPath | No |
Implementation Reference
- src/server.ts:208-216 (handler)The tool handler in src/server.ts calls cache.reloadProject to perform the actual reload logic.
async (args: ReloadProjectArgs) => { const project = cache.reloadProject(args); return { content: [ { type: "text", text: JSON.stringify(project, null, 2), }, ], - src/project-service.ts:333-344 (handler)The actual implementation of the project reload logic, residing in ProjectServiceCache class.
public reloadProject(options: ProjectLookupOptions): ProjectInfo { const project = resolveProject(options); const key = this.getCacheKey(project); const existing = this.services.get(key); if (!existing) { const created = new ProjectService(project); this.services.set(key, created); return created.getProjectInfo(); } return existing.reload(project); } - src/server.ts:202-207 (registration)Tool registration for reload_project in src/server.ts.
"reload_project", { title: "Reload Project", description: "Invalidate cached TypeScript project state and reload it from tsconfig.", inputSchema: reloadProjectSchema, }, - src/server.ts:31-35 (schema)Input schema definition for reload_project.
const reloadProjectSchema = z.object({ file: z.string().min(1).optional(), workspaceRoot: z.string().min(1).optional(), projectTsconfigPath: z.string().min(1).optional(), });