Skip to main content
Glama

update_track_plan

Update an existing project track's plan.md with new content to reflect task status changes, add phases, or record decisions. Requires an existing track.

Instructions

Overwrite the plan.md for an existing conductor track with new content. The track must already exist. Use this to update task status, add phases, or record decisions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trackNameYes
contentYes

Implementation Reference

  • MCP tool handler for 'update_track_plan'. Receives trackName and content, calls the manager's updateTrackPlan, and returns the result as JSON.
    server.tool(
      'update_track_plan',
      'Overwrite the plan.md for an existing conductor track with new content. The track must already exist. Use this to update task status, add phases, or record decisions.',
      UpdateTrackPlanSchema.shape,
      async (args) => {
        const result = await manager.updateTrackPlan(args.trackName, args.content);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      },
    );
  • Zod schema for update_track_plan inputs: trackName (non-empty string) and content (non-empty string).
    export const UpdateTrackPlanSchema = z.object({
      trackName: z.string().min(1),
      content: z.string().min(1),
    });
  • Manager logic for updateTrackPlan: validates the slug, delegates to FileSystemAccess.writeTrackPlan to write plan.md, returns result with length.
    async function updateTrackPlan(trackName: string, content: string): Promise<UpdateTrackPlanResult> {
      assertSafeSlug(trackName);
      await fs.writeTrackPlan(tracksDir, trackName, content);
      return { trackName, updated: true, length: content.length };
    }
  • Low-level filesystem helper that writes content to <tracksDir>/<trackName>/plan.md.
    async function writeTrackPlan(tracksDir: string, trackName: string, content: string): Promise<void> {
      const planPath = join(tracksDir, trackName, 'plan.md');
      await writeFile(planPath, content, { encoding: 'utf8' });
    }
  • src/index.ts:17-53 (registration)
    Top-level registration: imports and calls registerConductorTools, which registers 'update_track_plan' among other conductor tools.
    import { registerConductorTools } from './tools/conductor.tool.js';
    import { registerDevLifecycleTools } from './tools/dev-lifecycle.tool.js';
    
    import { createLogger } from './utilities/LoggingUtility.js';
    
    const log = createLogger('mempalace-mcp-dev');
    
    // --- Configuration (env-overridable) ---
    const REPO_DIR = resolve(process.env['MCP_REPO_DIR'] ?? process.cwd());
    const PALACE_DIR = resolve(process.env['MCP_PALACE_DIR'] ?? join(homedir(), '.mempalace', 'active'));
    const PALACE_WING = process.env['MCP_PALACE_WING'] ?? 'code';
    const LEDGER_PATH = resolve(process.env['MCP_LEDGER_PATH'] ?? join(REPO_DIR, '.mcp-dev', 'ledger.jsonl'));
    const TRACKS_DIR = resolve(process.env['MCP_TRACKS_DIR'] ?? join(REPO_DIR, 'conductor', 'tracks'));
    
    // --- Ensure required dirs exist ---
    const mcpDevDir = join(REPO_DIR, '.mcp-dev');
    if (!existsSync(mcpDevDir)) mkdirSync(mcpDevDir, { recursive: true });
    if (!existsSync(PALACE_DIR)) mkdirSync(PALACE_DIR, { recursive: true });
    
    // --- Compose Managers ---
    const codeSearchManager = createCodeSearchManager(PALACE_DIR, PALACE_WING, REPO_DIR);
    const ledgerManager = createLedgerManager(LEDGER_PATH, REPO_DIR);
    const branchManager = createBranchManager(REPO_DIR);
    const conductorManager = createConductorManager(TRACKS_DIR);
    const devLifecycleManager = createDevLifecycleManager(REPO_DIR);
    
    // --- MCP Server ---
    const server = new McpServer(
      { name: 'mempalace-mcp-dev', version: '1.0.0' },
    );
    
    // --- Register Tools (Clients in IDesign terms) ---
    registerCodeSearchTools(server, codeSearchManager, REPO_DIR);
    registerLedgerTools(server, ledgerManager);
    registerBranchTools(server, branchManager);
    registerConductorTools(server, conductorManager);
    registerDevLifecycleTools(server, devLifecycleManager);
Behavior3/5

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

Without annotations, the description carries the full burden. It discloses that the action is destructive ('overwrite') and includes a precondition (track must exist). However, it does not detail other behavioral traits such as atomicity, error handling, or return behavior, which is acceptable for a simple update operation.

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

Conciseness5/5

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

The description is two sentences, concise and front-loaded with the core action. Every sentence adds value without redundancy.

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

Completeness4/5

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

Given the simple two-parameter schema and no output schema, the description is largely complete. It covers purpose, prerequisite, and use cases. Minor gaps like error behavior are acceptable for this tool's complexity.

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

Parameters3/5

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

With 0% schema description coverage, the description partially compensates by explaining that content is used for task status, phases, or decisions. However, it does not describe the format or constraints for either parameter, leaving some ambiguity.

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

Purpose5/5

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

The description clearly states the tool overwrites plan.md for an existing conductor track, using specific verb ('overwrite') and resource ('plan.md' for a track). It implicitly distinguishes from siblings like get_track_plan (read) and create_track (create new track).

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool (update task status, add phases, record decisions) and states a prerequisite ('The track must already exist'). It does not explicitly mention when not to use or list alternatives, but the context is sufficient.

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/2loch-ness6/mempalace-mcp-dev'

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