Skip to main content
Glama

gitlab_update_snippet

Modify existing GitLab snippets by updating title, content, file name, description, or visibility settings to fix code, update examples, or change permissions.

Instructions

Update existing snippet Modifies: Title, content, file name, description, or visibility Use when: Fixing code, updating examples, changing permissions Flexibility: Update any combination of fields

Example usage: { "snippet_id": 123, "title": "Updated API Helper", "content": "// Updated with error handling\nfunction fetchData(url) { ... }", "description": "Enhanced with proper error handling" }

Returns: Updated snippet information

Related tools:

  • gitlab_get_snippet: View current content before updating

  • gitlab_create_snippet: Create new instead of updating

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
snippet_idYesSnippet ID Type: integer Format: Numeric snippet identifier Example: 123 How to find: From snippet URL or API responses
titleNoSnippet title Type: string Format: Descriptive title for the snippet Example: 'Database migration script' Note: Required when creating snippets
file_nameNoSnippet file name Type: string Format: File name with extension Example: 'migration.sql', 'helper.py', 'config.yaml' Note: Used for syntax highlighting and display
contentNoSnippet content Type: string Format: Raw text content of the snippet Example: 'console.log("Hello World");' Note: Can be code, text, or any content type
descriptionNoSnippet description Type: string Format: Optional description of the snippet Example: 'Helper script for database migrations' Note: Provides context about the snippet's purpose
visibilityNoSnippet visibility Type: string Format: Visibility level for the snippet Options: 'private' | 'internal' | 'public' Default: 'private' Examples: - 'private' (only visible to author) - 'internal' (visible to authenticated users) - 'public' (visible to everyone)

Tool Definition Quality

Score is being calculated. Check back soon.

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

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