pull_changes
Sync local LaTeX projects with Overleaf by pulling remote changes to maintain version consistency across environments.
Instructions
Pull latest changes from Overleaf for a local project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| localPath | Yes | The local path of the project |
Implementation Reference
- src/git-manager.ts:55-67 (handler)Core handler function that executes the git pull using simple-git library.async pullChanges(localPath: string) { if (!await fs.pathExists(localPath)) { throw new Error(`Directory ${localPath} does not exist`); } const git: SimpleGit = simpleGit(localPath); try { await git.pull(); return { success: true, message: 'Pulled latest changes' }; } catch (error: any) { throw new Error(`Failed to pull changes: ${error.message}`); } }
- src/index.ts:136-142 (handler)MCP CallToolRequestSchema handler that delegates to GitManager.pullChanges.case 'pull_changes': { const { localPath } = request.params.arguments as any; const result = await gitManager.pullChanges(localPath); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
- src/index.ts:58-71 (registration)Tool registration in ListToolsRequestSchema handler, including input schema.{ name: 'pull_changes', description: 'Pull latest changes from Overleaf for a local project', inputSchema: { type: 'object', properties: { localPath: { type: 'string', description: 'The local path of the project', }, }, required: ['localPath'], }, },