# create_or_update_file

Create or update a file in a GitLab project

Agent View of the PolicyLayer registry record for `create_or_update_file`. HTML page: https://policylayer.com/tools/io-github-zereight-gitlab-mcp/create-or-update-file

## Facts

- Tool: `create_or_update_file`
- Server: Gitlab Mcp (`@zereight/mcp-gitlab`) — https://policylayer.com/tools/io-github-zereight-gitlab-mcp.md
- Install: `npx -y @zereight/mcp-gitlab`
- Homepage: https://github.com/zereight/gitlab-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

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

## Why create_or_update_file is rated Medium

This tool creates or modifies files within a repository, which is a reversible write operation. Although the blast radius is significant (corrupting code or config could break deployments), the changes are not destructive (can be reverted via git history) and do not move money.

From the tool's own definition: "Tool description explicitly states 'Create or update a file' — both operations that modify data reversibly without deletion. In a GitLab context, this affects source code, documentation, and configuration files that are critical infrastructure artifacts."

## Use case

AI agents use create_or_update_file to create or update resources in Gitlab Mcp, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Gitlab Mcp environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Gitlab Mcp:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "create_or_update_file": {
      "limits": [
        {
          "counter": "create_or_update_file_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Gitlab Mcp (214)

- `cancel_pipeline_job` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/cancel-pipeline-job.md
- `delete_branch` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-branch.md
- `delete_draft_note` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-draft-note.md
- `delete_group_variable` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-group-variable.md
- `delete_group_wiki_page` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-group-wiki-page.md
- `delete_issue` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-issue.md
- `delete_issue_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-issue-emoji-reaction.md
- `delete_issue_link` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-issue-link.md
- `delete_issue_note_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-issue-note-emoji-reaction.md
- `delete_label` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-label.md
- `delete_merge_request_discussion_note` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-merge-request-discussion-note.md
- `delete_merge_request_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-merge-request-emoji-reaction.md
- `delete_merge_request_note` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-merge-request-note.md
- `delete_merge_request_note_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-merge-request-note-emoji-reaction.md
- `delete_milestone` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-milestone.md
- `delete_project_variable` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-project-variable.md
- `delete_release` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-release.md
- `delete_tag` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-tag.md
- `delete_wiki_page` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-wiki-page.md
- `delete_work_item_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-work-item-emoji-reaction.md
- `delete_work_item_note_emoji_reaction` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/delete-work-item-note-emoji-reaction.md
- `omg_clear_state` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/omg-clear-state.md
- `omg_delete_memory` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/omg-delete-memory.md
- `purge_dependency_proxy_cache` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/purge-dependency-proxy-cache.md
- `unprotect_branch` — Destructive — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/unprotect-branch.md
- `cancel_pipeline` — Execute — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/cancel-pipeline.md
- `create_pipeline` — Execute — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/create-pipeline.md
- `execute_graphql` — Execute — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/execute-graphql.md
- `omg_next_phase` — Execute — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/omg-next-phase.md
- `play_pipeline_job` — Execute — https://policylayer.com/tools/io-github-zereight-gitlab-mcp/play-pipeline-job.md
- …and 184 more: https://policylayer.com/tools/io-github-zereight-gitlab-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-zereight-gitlab-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-zereight-gitlab-mcp
