create-mcp-tool

Creates a new MCP tool wrapping a GitLab API endpoint with handlers, specs, tests, and docs.

37|4|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/jmrplens/gitlab-mcp-server --skill create-mcp-tool-jmrplens
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-mcp-tool
Source: https://github.com/jmrplens/gitlab-mcp-server/tree/main/.github/skills/create-mcp-tool
Command: npx skills add https://github.com/jmrplens/gitlab-mcp-server --skill create-mcp-tool-jmrplens

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new GitLab API endpoint as an MCP tool in this Go codebase requires touching many files—input/output structs, handlers, ActionSpec metadata, markdown formatters, tests, catalog wiring, e2e scenarios, and documentation—and missing any step fails CI gates. This Skill provides the complete end-to-end workflow so nothing is forgotten. ## Core Features & Use Cases - Full scaffolding workflow: Guides creation of the sub-package under internal/tools/{domain}/ with doc.go, handler file, action_specs.go, markdown.go, and test files, including naming conventions for multi-word domains. - Convention enforcement: Codifies rules for struct tags (jsonschema, tier), error handling variants (WrapErr, WrapErrWithHint, NotFoundResult), ActionSpec constructors, markdown formatter registration, and catalog aggregation via make gen-action-catalog-manifest. - Quality gates: Lists required test categories (success, validation, API error, markdown, empty state), e2e scenario requirements with typed harness.ActionID constants, and verification commands (make check-e2e-static, audit_doc_coverage, golangci-lint). - Use Case: When you need to expose a new GitLab REST v4 endpoint (e.g., listing project tags) as an MCP tool, follow this Skill to produce a complete, CI-passing implementation. ## Quick Start Use the create-mcp-tool skill to add a new MCP tool that lists project tags via the GitLab REST API. ## Quick Start Ask the AI to create a new MCP tool for a chosen GitLab API endpoint following this workflow.

Frequently Asked Questions about create-mcp-tool

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new MCP tool for a GitLab API endpoint?

Create a sub-package under internal/tools/{domain}/ with input/output structs, handler functions, ActionSpec metadata in action_specs.go, markdown formatters registered in init(), and tests. Then wire it into the catalog aggregation, add an e2e scenario, and update the docs.

What files are required for a new MCP tool package in Go?

The package needs doc.go, a handler file with input/output structs, action_specs.go for route metadata, markdown.go for formatters, and test files. Multi-word domains use underscores in file names only, never in the package identifier.

Which ActionSpec constructor should I use for a delete operation?

Use NewDeleteActionSpec with a route built by toolutil.DestructiveAction or DestructiveVoidAction, which gates execution behind a confirmation. Read operations use NewReadActionSpec, and mutations use NewCreateActionSpec or NewUpdateActionSpec.

How are GitLab Premium or Ultimate tier fields handled in tool schemas?

Tag fields with tier:"premium" or tier:"ultimate" and set the Edition on each ActionSpec. The catalog prunes those fields from schemas and withholds actions when the configured GITLAB_MCP_TIER is below the required edition.

Why does CI fail after adding a new MCP tool?

Common causes are a missing e2e scenario naming the action via a typed harness.ActionID constant, an unregenerated action catalog manifest, missing markdown formatter registration, or undocumented tools. Run make check-e2e-static, check-action-catalog-manifest, and audit_doc_coverage to diagnose.