Skip to main content
Glama

create_track

Create a new conductor track directory with plan.md, index.md, and metadata.json. Prevents duplicate creation by failing if the slug already exists.

Instructions

Create a new conductor track directory with plan.md, index.md, and metadata.json. Fails if the slug already exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
titleYes
typeNo
ownerNo

Implementation Reference

  • The core business logic for create_track. It validates the slug, generates plan.md, index.md, and metadata.json content, then delegates to FileSystemAccess.createTrackDir to write files to disk.
    async function createTrack(
      slug: string,
      title: string,
      type: string = 'feature',
      owner: string = 'platform-team',
    ): Promise<CreateTrackResult> {
      assertSafeSlug(slug);
      const today = new Date().toISOString().slice(0, 10);
    
      const plan = `# Plan — ${slug}\n\n**Status:** 🟡 In Progress\n**Phase:** Initial\n\n## Phases\n\n### Phase 1 — ${title}\n- [ ] TODO\n`;
      const index = `# ${title}\n\n**Status:** In Progress\n**Track Type:** ${type}\n\n## Summary\n\n${title}\n`;
      const metadata = JSON.stringify(
        {
          id: slug,
          title,
          type,
          status: 'active',
          owner,
          created: today,
          completed: '',
          template: '',
          governanceArtifact: '',
          dependencies: [],
        },
        null,
        2,
      ) + '\n';
    
      const files = { 'plan.md': plan, 'index.md': index, 'metadata.json': metadata };
      await fs.createTrackDir(tracksDir, slug, files);
      return { slug, created: true, files: Object.keys(files) };
    }
  • Zod schema for create_track inputs: slug (required), title (required), type (optional), owner (optional).
    export const CreateTrackSchema = z.object({
      slug: z.string().min(1),
      title: z.string().min(1),
      type: z.string().optional(),
      owner: z.string().optional(),
    });
  • MCP tool handler registration for 'create_track'. Wires the schema to the manager.createTrack call and returns JSON-serialized result.
    server.tool(
      'create_track',
      'Create a new conductor track directory with plan.md, index.md, and metadata.json. Fails if the slug already exists.',
      CreateTrackSchema.shape,
      async (args) => {
        const result = await manager.createTrack(args.slug, args.title, args.type, args.owner);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
        };
      },
    );
  • Low-level filesystem helper createTrackDir that creates the track directory (fails if exists due to recursive: false) and writes all provided files in parallel.
    async function createTrackDir(tracksDir: string, slug: string, files: Record<string, string>): Promise<void> {
      const trackDir = join(tracksDir, slug);
      await mkdir(trackDir, { recursive: false });
      await Promise.all(
        Object.entries(files).map(([filename, content]) =>
          writeFile(join(trackDir, filename), content, { encoding: 'utf8' }),
        ),
      );
    }
  • src/index.ts:52-52 (registration)
    Top-level registration: registerConductorTools(server, conductorManager) is called to register all conductor tools including create_track.
    registerConductorTools(server, conductorManager);
Behavior3/5

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

With no annotations, the description bears full burden. It discloses creation behavior and the duplicate slug failure, but lacks side effects, auth needs, or what happens on partial existence. Adequate but not thorough.

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?

Single sentence conveying creation and failure condition. No redundant information, highly efficient.

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?

No output schema, no annotations, and only 4 params with zero schema descriptions. The description lacks details on return value, parameter effects, and contents of created files. Incomplete for a creation tool.

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%, so description must compensate. It explains 'slug' as identifier for the directory, but ignores 'title', 'type', 'owner' parameters. Only 'slug' is partially described, leaving other params opaque.

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 creates a conductor track directory with specific files (plan.md, index.md, metadata.json) and fails if the slug exists. This distinguishes it from sibling tools like get_track_* or update_track_*.

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 vs alternatives. It only mentions failure on duplicate slug, but does not compare with update_track_* or list_tracks. Sibling tools are present but no context provided.

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