Skip to main content
Glama

Create commit

gitlab_create_commit

Create a new commit in a GitLab project by specifying the branch, message, and file actions, then receive the resulting commit details.

Instructions

Create a new commit.

Args: **kwargs: Additional parameters for the request.

Returns: Response: A wrapper containing the original response and a Commit model.

Raises: ParameterError: If invalid parameters are provided.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gitlab_create_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNo
refNo
dataNo
lineNo
nameNo
noteNo
pageNo
pathNo
forceNo
sinceNo
stateNo
statsNo
untilNo
branchNo
actionsNo
contextNo
dry_runNo
messageNo
coverageNo
per_pageNo
ref_nameNo
user_idsNo
group_idsNo
line_typeNo
max_pagesNo
rule_typeNo
start_shaNo
project_idNo
target_urlNo
with_statsNo
author_nameNo
commit_hashNo
descriptionNo
pipeline_idNo
report_typeNo
author_emailNo
start_branchNo
start_projectNo
protected_branch_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv27.3.20
    • removedInput schema / properties / api_parameters
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • removedInput schema / properties / author_email / anyOf
      Removed value: -[
      -  {
      -    "format": "email",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / author_email / title
      Added value: +"Author Email"
    • changedInput schema / properties / page / default
      Previous value: -1New value: +null
    • changedInput schema / properties / per_page / default
      Previous value: -100New value: +null
    • addedInput schema / properties / project_id / default
      Added value: +null
    • removedInput schema / properties / target_url / anyOf
      Removed value: -[
      -  {
      -    "format": "uri",
      -    "maxLength": 2083,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / target_url / title
      Added value: +"Target Url"
    • removedInput schema / required
      Removed value: -[
      -  "project_id"
      -]
  2. First observedv27.3.13

TDQS

C2/5.0
Behavior2/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false and openWorld=true, so the safety profile is partly covered. The description adds only a return wrapper and a ParameterError raise, which is thin, and it never mentions the significant behavioral levers exposed by the schema (force, dry_run, start_branch/start_sha, actions) nor any auth or permission requirements for pushing to a repository.

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

Conciseness2/5

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

The opening line is appropriately front-loaded, but the rest is auto-generated docstring scaffolding ("Args: **kwargs…", "Returns: Response…", "Raises: ParameterError…") that consumes space without conveying actionable information. It is short yet not efficient, since every sentence after the first is boilerplate.

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

Completeness1/5

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

For a 39-parameter, non-idempotent write operation with no output schema and zero parameter documentation, the description is grossly incomplete. An agent cannot determine required inputs, the effect of dry_run or force, or what the returned Commit wrapper contains well enough to call this reliably.

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

Parameters1/5

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

There are 39 parameters with 0% schema description coverage, and the description dismisses all of them with "**kwargs: Additional parameters for the request." Nothing explains what actions, branch, ref, start_sha, force, dry_run, or the many unrelated-looking fields (coverage, rule_type, user_ids) mean for this call. This is the exact case where the description had to compensate for the schema and does not.

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

Purpose3/5

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

"Create a new commit" names a specific verb and resource, so the basic action is unambiguous. However it gives no scope (which project, branch, or ref the commit lands on) and offers nothing to distinguish it from siblings such as gitlab_cherry_pick_commit, gitlab_revert_commit, or gitlab_create_tag, which an agent could easily confuse with commit-producing operations.

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

Usage Guidelines2/5

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

The description contains no when-to-use guidance at all – no prerequisites (project_id, branch, start_branch), no statement about when to prefer this over cherry-pick/revert or over pushing via another tool, and no caution about force/dry_run. The agent must infer the entire usage context from the name alone.

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

Deploy Server

Other Tools