Skip to main content
Glama

pull_changes

Sync local LaTeX projects with Overleaf by pulling remote changes to maintain up-to-date files and prevent version conflicts.

Instructions

Pull latest changes from Overleaf for a local project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localPathYesThe local path of the project

Implementation Reference

  • Core handler function that performs the git pull operation on the specified localPath 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}`); } }
  • MCP CallToolRequest handler case for 'pull_changes' tool, which delegates to GitManager.pullChanges and formats the response.
    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 ListToolsRequestHandler, defining the tool name, description, and input schema (localPath required).
    { 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'], }, },
  • Input schema definition for the 'pull_changes' tool, specifying the required 'localPath' parameter.
    inputSchema: { type: 'object', properties: { localPath: { type: 'string', description: 'The local path of the project', }, }, required: ['localPath'], }, },

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/juho127/overleafMCP'

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