update_track_index
Overwrite the index.md of an existing track to update its summary, status, or linked resources.
Instructions
Overwrite index.md for an existing conductor track. Use to update the track summary, status, or linked resources.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trackName | Yes | ||
| content | Yes |
Implementation Reference
- src/managers/ConductorManager.ts:111-115 (handler)Core handler for update_track_index. Validates the track slug, calls fs.writeTrackFile to overwrite index.md, and returns a result with trackName, filename, updated flag, and content length.
async function updateTrackIndex(trackName: string, content: string): Promise<UpdateTrackFileResult> { assertSafeSlug(trackName); await fs.writeTrackFile(tracksDir, trackName, 'index.md', content); return { trackName, filename: 'index.md', updated: true, length: content.length }; } - src/tools/conductor.tool.ts:41-44 (schema)Zod schema for update_track_index: validates trackName (non-empty string) and content (non-empty string).
export const UpdateTrackIndexSchema = z.object({ trackName: z.string().min(1), content: z.string().min(1), }); - src/tools/conductor.tool.ts:108-118 (registration)Registers the 'update_track_index' tool on the MCP server with its schema and handler that delegates to manager.updateTrackIndex.
server.tool( 'update_track_index', 'Overwrite index.md for an existing conductor track. Use to update the track summary, status, or linked resources.', UpdateTrackIndexSchema.shape, async (args) => { const result = await manager.updateTrackIndex(args.trackName, args.content); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }], }; }, ); - src/access/FileSystemAccess.ts:76-79 (helper)Low-level file write helper: writes content to index.md for the given track directory. Called by the handler.
async function writeTrackFile(tracksDir: string, trackName: string, filename: string, content: string): Promise<void> { const filePath = join(tracksDir, trackName, filename); await writeFile(filePath, content, { encoding: 'utf8' }); }