Skip to main content
Glama
harshmaur

GitLab MCP Server

by harshmaur

push_files

Push multiple files to a GitLab project in a single commit, enabling batch file updates with specified branch and commit message.

Instructions

Push multiple files to a GitLab project in a single commit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or complete URL-encoded path to project
branchYesBranch to push to
filesYesArray of files to push
commit_messageYesCommit message

Implementation Reference

  • Zod input schema for the 'push_files' tool. Defines parameters: project_id, branch, array of {file_path, content}, and commit_message. Used for validating tool inputs in MCP implementation.
    export const PushFilesSchema = ProjectParamsSchema.extend({
      branch: z.string().describe("Branch to push to"),
      files: z
        .array(
          z.object({
            file_path: z.string().describe("Path where to create the file"),
            content: z.string().describe("Content of the file"),
          })
        )
        .describe("Array of files to push"),
      commit_message: z.string().describe("Commit message"),
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose critical behavioral traits: whether this requires specific permissions, what happens on conflicts (overwrites existing files?), rate limits, error handling, or what the response looks like. For a mutation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose with zero wasted words. Every element ('push multiple files', 'GitLab project', 'single commit') earns its place by clarifying scope and behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 4 required parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context (permissions, conflicts, response format) and doesn't compensate for the missing structured data. While concise, it doesn't provide enough information for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional parameter semantics beyond implying batch operations ('multiple files') and atomic commits ('single commit'), which is already clear from the schema's 'files' array and 'commit_message' parameter. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('push multiple files'), target resource ('to a GitLab project'), and scope ('in a single commit'). It distinguishes from sibling tools like 'create_or_update_file' (which handles individual files) by emphasizing batch operations and atomic commits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for batch file operations with atomic commits, but doesn't explicitly state when to use this vs. alternatives like 'create_or_update_file' for single files or other GitLab operations. No guidance on prerequisites, error conditions, or exclusions is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/harshmaur/gitlab-mcp'

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