Skip to main content
Glama
c0sc0s
by c0sc0s

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
NameRequiredDescriptionDefault
fileNo
workspaceRootNo
projectTsconfigPathNo

Implementation Reference

  • 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),
          },
        ],
  • 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,
    },
  • 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(),
    });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/c0sc0s/agent-workspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server