Skip to main content
Glama

get_status

Check git status and view differences for Overleaf LaTeX projects to track local changes before syncing with the cloud.

Instructions

Get the status of the local project (git status and diff)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localPathYesThe local path of the project

Implementation Reference

  • The core handler function that executes the tool logic: checks if directory exists, retrieves git status and diff summary using simple-git, and returns the results.
    async getStatus(localPath: string) { if (!await fs.pathExists(localPath)) { throw new Error(`Directory ${localPath} does not exist`); } const git: SimpleGit = simpleGit(localPath); try { const status = await git.status(); const diff = await git.diff(['--stat']); return { success: true, status: status, diff: diff }; } catch (error: any) { throw new Error(`Failed to get status: ${error.message}`); } }
  • Input schema definition for the 'get_status' tool, specifying the required 'localPath' parameter.
    inputSchema: { type: 'object', properties: { localPath: { type: 'string', description: 'The local path of the project', }, }, required: ['localPath'], },
  • src/index.ts:150-155 (registration)
    Tool dispatch registration in the CallToolRequestHandler switch statement, which extracts arguments and calls the gitManager handler.
    case 'get_status': { const { localPath } = request.params.arguments as any; const result = await gitManager.getStatus(localPath); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], };
  • src/index.ts:90-103 (registration)
    Tool registration in the ListToolsRequestHandler response, declaring the tool name, description, and schema.
    { name: 'get_status', description: 'Get the status of the local project (git status and diff)', 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