Skip to main content
Glama
c0sc0s
by c0sc0s

Reload Project

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(),
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. 'Invalidate cached' implies state mutation, but lacks details on blocking behavior, failure modes if tsconfig is malformed, or whether this affects in-flight operations. Just barely adequate for a stateful tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single efficient sentence front-loaded with the action. However, extreme brevity is inappropriate given three undocumented parameters and the absence of annotations - conciseness becomes under-specification here.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Mutation tool with 0% schema coverage, no annotations, and no output schema requires substantial description support. Currently explains the operation but fails to document parameter meanings, return values, or error conditions necessary for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, requiring description compensation. While 'reload it from tsconfig' hints at projectTsconfigPath, parameters 'file' and 'workspaceRoot' are completely undocumented with no indication of their purpose or which is required when.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear action (invalidate cache, reload) and resource (TypeScript project state from tsconfig). Distinguishes from siblings like get_definition or get_diagnostics by describing a cache-mutation operation rather than a query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus letting the server auto-detect changes, or when it's necessary to manually reload. No mention of prerequisites or side effects on concurrent operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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