Skip to main content
Glama

Create Snippet Tool

create_snippet_tool

Create a new GitLab project snippet from a project ID or path, title, file name, and content, with optional Markdown description and visibility.

Instructions

Create a new snippet in a GitLab project.

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>",
      "title": "<title>",
      "file_name": "<file_name>",
      "content": "<content>"
    },
    "name": "create_snippet_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesSnippet title
contentYesSnippet content
file_nameYesFile name for the snippet (e.g., "example.py")
project_idYesProject ID or path
visibilityNoVisibility level (private, internal, public)private
descriptionNoSnippet description (Markdown)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of disclosure. It says the tool creates a snippet but does not mention write permissions, visibility defaults, mutation effects, or any rate-limit or error behavior.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no wasted words. It efficiently states the core action and target resource.

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

Completeness3/5

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

The output schema exists and the input schema is fully documented, so return values and parameter meanings need not be repeated. However, with no annotations, the description is thin on behavioral context for a mutation tool and lacks any usage guidance.

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 the schema already explains every parameter including project_id, title, file_name, content, visibility, and description. The description does not add meaning beyond the schema, which is acceptable at the baseline for fully documented parameters.

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?

The description states a specific verb and resource — create a snippet — and scopes it to a GitLab project. It is clear enough to distinguish from list_snippets_tool, though it does not explicitly mention the sibling or other creation tools.

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 tool rather than related tools such as create_file_tool or list_snippets_tool, nor are prerequisites or expected use cases described. The agent must infer usage from the name and schema alone.

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