Skip to main content
Glama

Create File Tool

create_file_tool

Creates a new file in a GitLab repository by committing specified content to a branch with a commit message.

Instructions

Create a new file in a GitLab repository.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "file_path": "<file_path>",
      "branch": "<branch>",
      "content": "<content>",
      "commit_message": "<commit_message>"
    },
    "name": "create_file_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesBranch to commit to
contentYesFile content (text or base64 depending on encoding)
encodingNoContent encoding - "text" or "base64" (default: text)text
file_pathYesPath for the new file
project_idYesProject ID or path
commit_messageYesCommit message

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing. It does not say whether a commit is created on the given branch, whether the branch must already exist, what happens if the file path already exists, or what permissions are required — significant omissions for a write operation.

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

Conciseness4/5

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

A single front-loaded sentence with zero padding — efficient and easy to scan. The brevity costs it nothing here, since the missing detail is scored under other dimensions rather than as conciseness.

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?

This is a 6-parameter mutation tool with five required fields, no annotations, and no output-schema relief for the call itself. An agent still lacks the commit/branch semantics, overwrite behavior, and failure modes needed to invoke it confidently; the description does far too little for that complexity.

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 every parameter is already documented in the schema (branch, content, encoding, file_path, project_id, commit_message). The description adds no additional meaning such as path format conventions or the interaction between content and encoding, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource ("Create a new file in a GitLab repository"), so an agent immediately knows the operation. It does not, however, distinguish itself from close siblings such as update_file_tool or create_branch_tool, leaving the boundary to be inferred.

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?

There is no guidance on when to use this versus update_file_tool (existing file), create_branch_tool, or create_wiki_page_tool. No prerequisites or exclusions are stated — the agent gets a bare purpose statement and must infer the rest from the name.

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