Skip to main content
Glama

update_snippet

Modify an existing code snippet's content, title, file name, description, or visibility settings in a GitLab project, enabling agents to edit stored code directly by snippet ID.

Instructions

Update an existing code snippet's content, title, file name, or visibility

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoUpdated snippet title
contentNoUpdated code or text content
file_nameNoUpdated file name
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
snippet_idYesNumeric ID of the snippet to update
visibilityNoUpdated visibility level
descriptionNoUpdated description

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

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. It implies mutation but omits whether partial updates are supported, what happens to unchanged fields, permission requirements, or reversibility. Notably it also omits the 'description' field from its field list, even though that field is updatable.

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 efficient sentence that is front-loaded with verb and resource. It earns its place but is so terse it leaves no room for the guidance a mutation tool needs.

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 7-parameter mutation tool with zero annotations and no output schema, the description is too thin. It should explain partial-update semantics, required vs optional fields, permission constraints, and that description is also updatable.

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% with each of the 7 parameters documented, so the schema does the heavy lifting. The description lists four of the mutable fields, adding little beyond the schema and actually under-counting the updatable fields (description is omitted). Baseline 3 applies given full coverage.

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 (Update) and resource (existing code snippet), and enumerates the mutable fields (content, title, file name, visibility). It is clearly distinguishable from create_snippet, get_snippet, and list_snippets, though it does not name any sibling explicitly.

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 provides no when-to-use guidance, no prerequisites (e.g., needed permissions or ownership), and does not mention alternatives such as get_snippet to read before updating. An agent must infer all context.

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