Skip to main content
Glama

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
NameRequiredDescriptionDefault
localPathYesThe local path of the project

Implementation Reference

  • 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}`);
        }
    }
  • 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'],
        },
    },

Tool Definition Quality

Score is being calculated. Check back soon.

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

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