{
  "$schema": "../../profile-schema.json",
  "profile_name": "gitlab-default",
  "profile_id": "gitlab",
  "profile_aliases": ["gitlab-default", "gitlab-developer"],
  "openapi_spec_path": "./openapi.yaml",
  "description": "Comprehensive operation-style tool set (manage_merge_requests, manage_issues, manage_projects, ...).",
  
  "parameter_aliases": {
    "id": ["project_id", "group_id", "resource_id"],
    "badge_id": ["badge_id"],
    "branch": ["branch"],
    "user_id": ["user_id"],
    "job_id": ["job_id"],
    "merge_request_iid": ["iid", "mr_iid"],
    "issue_iid": ["iid"],
    "note_id": ["comment_id"],
    "file_path": ["path", "filepath"],
    "path": ["file_path", "filepath"],
    "pipeline_id": ["pipeline"],
    "discussion_id": ["discussion"],
    "hook_id": ["webhook_id"],
    "snippet_id": ["snippet"],
    "tag_name": ["tag"]
  },
  
  "tools": [
    {
      "name": "manage_groups",
      "description": "Work with GitLab groups. Actions: 'list' (all groups), 'get' (group details), 'list_projects' (projects in group), 'list_subgroups' (subgroups of group). Use 'list' to discover groups, 'list_projects' to see projects in a specific group. For 'get', 'list_projects', and 'list_subgroups', pass 'group_id'.",
      "metadata_params": ["action", "group_id"],
      "operations": {
        "list": "getApiV4Groups",
        "get": "getApiV4GroupsId",
        "list_projects": "getApiV4GroupsIdProjects",
        "list_subgroups": "getApiV4GroupsIdSubgroups"
      },
      "response_fields": {
        "list": ["id", "name", "path", "full_path", "description", "visibility", "web_url"],
        "list_projects": ["id", "name", "path", "path_with_namespace", "description", "visibility", "web_url", "last_activity_at", "star_count", "forks_count", "avatar_url"],
        "list_subgroups": ["id", "name", "path", "full_path", "description", "visibility", "web_url"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get", "list_projects", "list_subgroups"],
          "description": "Action to perform",
          "required": true
        },
        "group_id": {
          "type": "string",
          "description": "Group ID (numeric like '36173' or short name like 'davidruzicka')",
          "required_for": ["get", "list_projects", "list_subgroups"],
          "example": "davidruzicka"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        },
        "search": {
          "type": "string",
          "description": "Search for groups/projects by name"
        },
        "owned": {
          "type": "boolean",
          "description": "Limit to groups owned by current user (for list action)"
        },
        "archived": {
          "type": "boolean",
          "description": "Limit by archived status (for list_projects action)"
        }
      }
    },

    {
      "name": "manage_pipelines_jobs",
      "description": "Run and inspect pipelines/jobs. Actions: 'list_pipelines', 'run_pipeline', 'get_pipeline', 'list_pipeline_jobs', 'get_job', 'retry_job', 'cancel_job', 'play_job', 'download_job_artifacts' (proxy download), 'download_job_artifact' (single file). For 'list_pipelines', optionally pass 'ref'. For 'run_pipeline', pass 'ref'. For 'get_pipeline' and 'list_pipeline_jobs', pass 'pipeline_id'. For job actions, pass 'job_id'. For 'download_job_artifact', pass 'artifact_path'.",
      "metadata_params": ["action", "project_id", "pipeline_id", "job_id"],
      "operations": {
        "list_pipelines": "getApiV4ProjectsIdPipelines",
        "run_pipeline": "postApiV4ProjectsIdPipeline",
        "get_pipeline": "getApiV4ProjectsIdPipelinesPipelineId",
        "list_pipeline_jobs": "getApiV4ProjectsIdPipelinesPipelineIdJobs",
        "get_job": "getSingleJob",
        "retry_job": "postApiV4ProjectsIdJobsJobIdRetry",
        "play_job": "triggerManualJob",
        "cancel_job": "postApiV4ProjectsIdJobsJobIdCancel",
        "download_job_artifacts": {
          "type": "proxy_download",
          "metadata_endpoint": "getSingleJob",
          "download_endpoint": "getApiV4ProjectsIdJobsJobIdArtifacts"
        },
        "download_job_artifact": {
          "type": "proxy_download",
          "metadata_endpoint": "getSingleJob",
          "download_endpoint": "getApiV4ProjectsIdJobsJobIdArtifactsArtifactPath"
        }
      },
      "response_fields": {
        "list_pipelines": ["id", "status", "ref", "web_url"],
        "run_pipeline": ["id", "status", "ref", "web_url"],
        "get_pipeline": ["id", "status", "ref", "web_url"],
        "list_pipeline_jobs": ["id", "status", "stage", "name", "ref", "web_url"],
        "get_job": ["id", "status", "stage", "name", "ref", "web_url"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_pipelines", "run_pipeline", "get_pipeline", "list_pipeline_jobs", "get_job", "retry_job", "cancel_job", "play_job", "download_job_artifacts", "download_job_artifact"],
          "description": "Pipeline/job action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID (numeric or URL-encoded path)",
          "required": true
        },
        "pipeline_id": {
          "type": "integer",
          "description": "Pipeline ID",
          "required_for": ["get_pipeline", "list_pipeline_jobs"]
        },
        "job_id": {
          "type": "integer",
          "description": "Job ID",
          "required_for": ["get_job", "retry_job", "cancel_job", "play_job", "download_job_artifacts", "download_job_artifact"]
        },
        "ref": {
          "type": "string",
          "description": "Branch or tag to run pipeline on",
          "required_for": ["run_pipeline"]
        },
        "artifact_path": {
          "type": "string",
          "description": "Path to a file inside the job artifacts archive",
          "required_for": ["download_job_artifact"]
        }
      }
    },

    {
      "name": "manage_labels_milestones",
      "description": "Manage project and group labels/milestones. Actions: 'list_labels', 'list_group_labels', 'create_label', 'delete_label', 'list_milestones', 'list_group_milestones', 'create_milestone', 'update_milestone'. For 'create_label', pass 'name' and 'color'. For 'delete_label', pass 'name'. For 'create_milestone' and 'update_milestone', pass 'title'. For 'update_milestone', also pass 'milestone_id'. For group list actions, pass 'group_id'.",
      "metadata_params": ["action", "project_id", "group_id", "milestone_id"],
      "operations": {
        "list_labels": "getApiV4ProjectsIdLabels",
        "list_group_labels": "getApiV4GroupsIdLabels",
        "create_label": "postApiV4ProjectsIdLabels",
        "delete_label": "deleteApiV4ProjectsIdLabels",
        "list_milestones": "getApiV4ProjectsIdMilestones",
        "list_group_milestones": "getApiV4GroupsIdMilestones",
        "create_milestone": "postApiV4ProjectsIdMilestones",
        "update_milestone": "putApiV4ProjectsIdMilestonesMilestoneId"
      },
      "response_fields": {
        "list_labels": ["id", "name", "color", "description"],
        "list_group_labels": ["id", "name", "color", "description"],
        "create_label": ["id", "name", "color", "description"],
        "list_milestones": ["id", "iid", "title", "state"],
        "list_group_milestones": ["id", "iid", "title", "state"],
        "create_milestone": ["id", "iid", "title", "state"],
        "update_milestone": ["id", "iid", "title", "state"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_labels", "list_group_labels", "create_label", "delete_label", "list_milestones", "list_group_milestones", "create_milestone", "update_milestone"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required_for": ["list_labels", "create_label", "delete_label", "list_milestones", "create_milestone", "update_milestone"]
        },
        "group_id": {
          "type": "string",
          "description": "Group ID",
          "required_for": ["list_group_labels", "list_group_milestones"]
        },
        "name": {
          "type": "string",
          "description": "Label name",
          "required_for": ["create_label", "delete_label"]
        },
        "color": {
          "type": "string",
          "description": "Label color in hex",
          "required_for": ["create_label"]
        },
        "title": {
          "type": "string",
          "description": "Milestone title",
          "required_for": ["create_milestone", "update_milestone"]
        },
        "milestone_id": {
          "type": "integer",
          "description": "Milestone ID",
          "required_for": ["update_milestone"]
        },
        "state_event": {
          "type": "string",
          "enum": ["close", "activate"],
          "description": "Change milestone state",
          "required_for": []
        }
      }
    },

    {
      "name": "manage_releases_tags",
      "description": "Manage releases and tags. Actions: 'list_releases', 'create_release', 'list_tags', 'create_tag', 'delete_tag'. For 'create_release', pass 'name' and 'tag_name'. For 'create_tag', pass 'tag_name' and 'ref'. For 'delete_tag', pass 'tag_name'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "list_releases": "getApiV4ProjectsIdReleases",
        "create_release": "postApiV4ProjectsIdReleases",
        "list_tags": "getApiV4ProjectsIdRepositoryTags",
        "create_tag": "postApiV4ProjectsIdRepositoryTags",
        "delete_tag": "deleteApiV4ProjectsIdRepositoryTagsTagName"
      },
      "response_fields": {
        "list_releases": ["name", "tag_name", "description", "released_at"],
        "create_release": ["name", "tag_name", "description", "released_at"],
        "list_tags": ["name", "message", "target"],
        "create_tag": ["name", "message", "target"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_releases", "create_release", "list_tags", "create_tag", "delete_tag"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required": true
        },
        "tag_name": {
          "type": "string",
          "description": "Tag name",
          "required_for": ["create_release", "create_tag", "delete_tag"]
        },
        "name": {
          "type": "string",
          "description": "Release or tag name",
          "required_for": ["create_release"]
        },
        "ref": {
          "type": "string",
          "description": "Ref to create tag from",
          "required_for": ["create_tag"]
        },
        "description": {
          "type": "string",
          "description": "Release description"
        }
      }
    },

    {
      "name": "manage_project_members",
      "description": "Manage project members. Actions: 'list_members', 'add_member', 'remove_member'. For 'add_member', pass 'user_id' and 'access_level'. For 'remove_member', pass 'user_id'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "list_members": "getApiV4ProjectsIdMembers",
        "add_member": "postApiV4ProjectsIdMembers",
        "remove_member": "deleteApiV4ProjectsIdMembersUserId"
      },
      "response_fields": {
        "list_members": ["id", "username", "name", "access_level"],
        "add_member": ["id", "username", "name", "access_level"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_members", "add_member", "remove_member"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required": true
        },
        "user_id": {
          "type": "integer",
          "description": "User ID to add or remove",
          "required_for": ["add_member", "remove_member"]
        },
        "access_level": {
          "type": "integer",
          "description": "Access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner)",
          "required_for": ["add_member"],
          "default": 30
        }
      }
    },

    {
      "name": "manage_project_hooks",
      "description": "Manage project webhooks. Actions: 'list_hooks', 'get_hook', 'create_hook', 'update_hook', 'delete_hook'. For 'create_hook' and 'update_hook', pass 'url'. For 'get_hook' and 'delete_hook', pass 'hook_id'.",
      "metadata_params": ["action", "project_id", "hook_id"],
      "operations": {
        "list_hooks": "getApiV4ProjectsIdHooks",
        "get_hook": "getApiV4ProjectsIdHooksHookId",
        "create_hook": "postApiV4ProjectsIdHooks",
        "update_hook": "putApiV4ProjectsIdHooksHookId",
        "delete_hook": "deleteApiV4ProjectsIdHooksHookId"
      },
      "response_fields": {
        "list_hooks": ["id", "url", "push_events", "issues_events", "merge_requests_events"],
        "get_hook": ["id", "url", "push_events", "issues_events", "merge_requests_events"],
        "create_hook": ["id", "url", "push_events", "issues_events", "merge_requests_events"],
        "update_hook": ["id", "url", "push_events", "issues_events", "merge_requests_events"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_hooks", "get_hook", "create_hook", "update_hook", "delete_hook"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required": true
        },
        "hook_id": {
          "type": "integer",
          "description": "Hook ID",
          "required_for": ["get_hook", "update_hook", "delete_hook"]
        },
        "url": {
          "type": "string",
          "description": "Hook URL",
          "required_for": ["create_hook", "update_hook"]
        },
        "push_events": {
          "type": "boolean",
          "description": "Enable push events"
        },
        "issues_events": {
          "type": "boolean",
          "description": "Enable issues events"
        },
        "merge_requests_events": {
          "type": "boolean",
          "description": "Enable merge requests events"
        }
      }
    },

    {
      "name": "manage_project_variables",
      "description": "Manage project variables. Actions: 'list', 'get', 'create', 'update', 'delete'. For 'get', 'update', and 'delete', pass 'key'. For 'create' and 'update', pass 'value'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "list": "getApiV4ProjectsIdVariables",
        "get": "getApiV4ProjectsIdVariablesKey",
        "create": "postApiV4ProjectsIdVariables",
        "update": "putApiV4ProjectsIdVariablesKey",
        "delete": "deleteApiV4ProjectsIdVariablesKey"
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get", "create", "update", "delete"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required": true
        },
        "key": {
          "type": "string",
          "description": "Variable key",
          "required_for": ["get", "update", "delete"]
        },
        "value": {
          "type": "string",
          "description": "Variable value",
          "required_for": ["create", "update"]
        },
        "protected": {
          "type": "boolean",
          "description": "Whether the variable is protected"
        },
        "masked": {
          "type": "boolean",
          "description": "Whether the variable is masked"
        },
        "environment_scope": {
          "type": "string",
          "description": "Environment scope for the variable"
        }
      }
    },

    {
      "name": "manage_snippets",
      "description": "Read project snippets and download raw content via proxy. Actions: 'list_snippets', 'get_snippet', 'download_snippet'. For 'get_snippet' and 'download_snippet', pass 'snippet_id'.",
      "metadata_params": ["action", "project_id", "snippet_id"],
      "operations": {
        "list_snippets": "getApiV4ProjectsIdSnippets",
        "get_snippet": "getApiV4ProjectsIdSnippetsSnippetId",
        "download_snippet": {
          "type": "proxy_download",
          "metadata_endpoint": "getApiV4ProjectsIdSnippetsSnippetId",
          "download_endpoint": "getApiV4ProjectsIdSnippetsSnippetIdRaw"
        }
      },
      "response_fields": {
        "list_snippets": ["id", "title", "file_name", "visibility"],
        "get_snippet": ["id", "title", "file_name", "description", "visibility"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_snippets", "get_snippet", "download_snippet"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID",
          "required": true
        },
        "snippet_id": {
          "type": "integer",
          "description": "Snippet ID",
          "required_for": ["get_snippet", "download_snippet"]
        }
      }
    },

    {
      "name": "manage_projects",
      "description": "Work with GitLab projects. Actions: 'list' (all projects), 'get' (project details), 'list_members' (project members). Use 'list' to discover projects. For 'get' and 'list_members', pass 'project_id'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "list": "getApiV4Projects",
        "get": "getApiV4ProjectsId",
        "list_members": "getApiV4ProjectsIdMembers"
      },
      "response_fields": {
        "list": ["id", "name", "path", "path_with_namespace", "description", "visibility", "web_url", "last_activity_at", "star_count", "forks_count", "avatar_url", "namespace"],
        "list_members": ["id", "name", "username", "access_level"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get", "list_members"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required_for": ["get", "list_members"],
          "example": "123"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        },
        "search": {
          "type": "string",
          "description": "Search for projects by name or description"
        },
        "archived": {
          "type": "boolean",
          "description": "Limit by archived status"
        },
        "id_after": {
          "type": "integer",
          "description": "Limit results to projects with IDs greater than the specified ID"
        },
        "id_before": {
          "type": "integer",
          "description": "Limit results to projects with IDs less than the specified ID"
        },
        "min_access_level": {
          "type": "integer",
          "description": "Limit to projects with at least the specified access level"
        },
        "order_by": {
          "type": "string",
          "description": "Order results by supported fields"
        },
        "owned": {
          "type": "boolean",
          "description": "Limit to projects owned by current user"
        },
        "membership": {
          "type": "boolean",
          "description": "Limit to projects current user is a member of"
        },
        "simple": {
          "type": "boolean",
          "description": "Return only limited fields for each project"
        }
      }
    },

    {
      "name": "manage_merge_requests",
      "description": "Work with merge requests. Actions: 'list' (all MRs in project), 'get' (single MR details), 'create' (create new MR), 'update' (update MR), 'delete' (delete MR - admins only), 'merge' (accept MR), 'list_commits', 'list_diffs', 'list_raw_diffs', 'list_pipelines', 'create_pipeline', 'list_notes' (get all comments), 'get_note' (single comment), 'create_note' (add comment), 'update_note' (edit comment), 'delete_note' (remove comment), 'download_note_attachment' (download note attachment via proxy), 'list_discussions', 'get_discussion', 'create_discussion', 'reply_discussion', 'delete_discussion', 'set_discussion_resolved', 'get_approvals', 'approve', 'unapprove', 'list_versions' (list diff versions), 'get_version' (specific diff version), 'list_award_emoji', 'get_award_emoji', 'create_award_emoji', 'delete_award_emoji', 'list_note_award_emoji', 'get_note_award_emoji', 'create_note_award_emoji', 'delete_note_award_emoji'. Use 'list' to see all merge requests, filter by state (opened, closed, merged, all). For actions that target a specific MR, pass 'merge_request_iid'.",
      "metadata_params": ["action", "project_id", "merge_request_iid", "note_id", "award_id", "discussion_id", "version_id"],
      "operations": {
        "list": "getApiV4ProjectsIdMergeRequests",
        "get": "getApiV4ProjectsIdMergeRequestsMergeRequestIid",
        "create": "postApiV4ProjectsIdMergeRequests",
        "update": "putApiV4ProjectsIdMergeRequestsMergeRequestIid",
        "delete": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIid",
        "merge": "putApiV4ProjectsIdMergeRequestsMergeRequestIidMerge",
        "list_commits": "getApiV4ProjectsIdMergeRequestsMergeRequestIidCommits",
        "list_diffs": "getApiV4ProjectsIdMergeRequestsMergeRequestIidDiffs",
        "list_raw_diffs": "getApiV4ProjectsIdMergeRequestsMergeRequestIidRawDiffs",
        "list_pipelines": "getApiV4ProjectsIdMergeRequestsMergeRequestIidPipelines",
        "create_pipeline": "postApiV4ProjectsIdMergeRequestsMergeRequestIidPipelines",
        "list_notes": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotes",
        "get_note": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
        "create_note": "postApiV4ProjectsIdMergeRequestsMergeRequestIidNotes",
        "update_note": "putApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
        "delete_note": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
        "download_note_attachment": {
          "type": "proxy_download",
          "metadata_endpoint": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId",
          "url_field": "attachment"
        },
        "list_discussions": "getApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussions",
        "create_discussion": "postApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussions",
        "get_discussion": "getApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussionsDiscussionId",
        "reply_discussion": "postApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussionsDiscussionIdNotes",
        "delete_discussion": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussionsDiscussionId",
        "set_discussion_resolved": "putApiV4ProjectsIdMergeRequestsMergeRequestIidDiscussionsDiscussionId",
        "get_approvals": "getApiV4ProjectsIdMergeRequestsMergeRequestIidApprovals",
        "approve": "postApiV4ProjectsIdMergeRequestsMergeRequestIidApprove",
        "unapprove": "postApiV4ProjectsIdMergeRequestsMergeRequestIidUnapprove",
        "list_versions": "getApiV4ProjectsIdMergeRequestsMergeRequestIidVersions",
        "get_version": "getApiV4ProjectsIdMergeRequestsMergeRequestIidVersionsVersionId",
        "list_award_emoji": "getApiV4ProjectsIdMergeRequestsMergeRequestIidAwardEmoji",
        "create_award_emoji": "postApiV4ProjectsIdMergeRequestsMergeRequestIidAwardEmoji",
        "get_award_emoji": "getApiV4ProjectsIdMergeRequestsMergeRequestIidAwardEmojiAwardId",
        "delete_award_emoji": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidAwardEmojiAwardId",
        "list_note_award_emoji": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteIdAwardEmoji",
        "create_note_award_emoji": "postApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteIdAwardEmoji",
        "get_note_award_emoji": "getApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteIdAwardEmojiAwardId",
        "delete_note_award_emoji": "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteIdAwardEmojiAwardId"
      },
      "response_fields": {
        "list": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "create": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at"],
        "update": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "merge": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "list_commits": ["id", "short_id", "title", "message", "author_name", "authored_date", "committed_date"],
        "list_diffs": ["old_path", "new_path", "new_file", "renamed_file", "deleted_file", "diff"],
        "list_pipelines": ["id", "status", "ref", "sha", "web_url"],
        "create_pipeline": ["id", "status", "ref", "sha", "web_url"],
        "list_notes": ["id", "body", "author", "created_at", "updated_at", "system", "confidential"],
        "get_note": ["id", "body", "author", "created_at", "updated_at", "system", "confidential", "attachment"],
        "create_note": ["id", "body", "author", "created_at", "system", "confidential"],
        "update_note": ["id", "body", "author", "created_at", "updated_at", "system", "confidential"],
        "list_discussions": ["id", "notes", "resolved"],
        "get_discussion": ["id", "notes", "resolved"],
        "create_discussion": ["id", "notes", "resolved"],
        "reply_discussion": ["id", "notes", "resolved"],
        "set_discussion_resolved": ["id", "notes", "resolved"],
        "get_approvals": ["approvals_required", "approvals_left", "approved_by"],
        "approve": ["approvals_required", "approvals_left", "approved_by"],
        "unapprove": ["approvals_required", "approvals_left", "approved_by"],
        "list_versions": ["id", "short_commit_id", "created_at", "real_size", "commits_count", "head_commit_sha", "base_commit_sha", "start_commit_sha"],
        "get_version": ["id", "head_commit_sha", "base_commit_sha", "start_commit_sha", "real_size", "created_at", "diffs"],
        "list_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"],
        "create_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"],
        "get_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"],
        "list_note_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"],
        "create_note_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"],
        "get_note_award_emoji": ["id", "name", "user", "created_at", "updated_at", "awardable_id", "awardable_type"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get", "create", "update", "delete", "merge", "list_commits", "list_diffs", "list_raw_diffs", "list_pipelines", "create_pipeline", "list_notes", "get_note", "create_note", "update_note", "delete_note", "download_note_attachment", "list_discussions", "get_discussion", "create_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved", "get_approvals", "approve", "unapprove", "list_versions", "get_version", "list_award_emoji", "get_award_emoji", "create_award_emoji", "delete_award_emoji", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "merge_request_iid": {
          "type": "integer",
          "description": "The internal ID of the merge request",
          "required_for": ["get", "update", "delete", "merge", "list_commits", "list_diffs", "list_raw_diffs", "list_pipelines", "create_pipeline", "list_notes", "get_note", "create_note", "update_note", "delete_note", "download_note_attachment", "list_discussions", "get_discussion", "create_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved", "get_approvals", "approve", "unapprove", "list_versions", "get_version", "list_award_emoji", "get_award_emoji", "create_award_emoji", "delete_award_emoji", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"]
        },
        "discussion_id": {
          "type": "string",
          "description": "The ID of the discussion",
          "required_for": ["get_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved"]
        },
        "resolved": {
          "type": "boolean",
          "description": "Resolve or unresolve discussion",
          "required_for": ["set_discussion_resolved"]
        },
        "version_id": {
          "type": "integer",
          "description": "The ID of the merge request version",
          "required_for": ["get_version"]
        },
        "source_branch": {
          "type": "string",
          "description": "The source branch name (required for create)",
          "required_for": ["create"],
          "example": "feature/new-feature"
        },
        "target_branch": {
          "type": "string",
          "description": "The target branch name (required for create, optional for update)",
          "required_for": ["create"],
          "example": "main"
        },
        "title": {
          "type": "string",
          "description": "The title of the merge request (required for create, optional for update)",
          "required_for": ["create"],
          "example": "Implement new feature"
        },
        "description": {
          "type": "string",
          "description": "The description of the merge request (optional for create and update)",
          "example": "This implements the new feature requested by the team."
        },
        "assignee_id": {
          "type": "integer",
          "description": "The ID of the user to assign the merge request to (optional for create and update)",
          "example": 123
        },
        "assignee_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The IDs of the users to assign the merge request to (optional for create and update)",
          "example": [123, 456]
        },
        "reviewer_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The IDs of the users to review the merge request (optional for create and update)",
          "example": [789, 101]
        },
        "labels": {
          "type": "string",
          "description": "Labels to be added to the merge request (comma-separated, optional for create and update)",
          "example": "bug,feature,frontend"
        },
        "milestone_id": {
          "type": "integer",
          "description": "The ID of the milestone to assign the merge request to (optional for create and update)",
          "example": 42
        },
        "allow_collaboration": {
          "type": "boolean",
          "description": "Allow commits from the target branch to be pushed to the source branch (optional for create)",
          "default": false,
          "example": true
        },
        "allow_maintainer_to_push": {
          "type": "boolean",
          "description": "Allow maintainers to push to the source branch (optional for create)",
          "default": false,
          "example": true
        },
        "squash": {
          "type": "boolean",
          "description": "Squash commits when merge request is accepted (optional for create)",
          "default": false,
          "example": true
        },
        "target_project_id": {
          "type": "integer",
          "description": "The target project ID (when creating merge request across projects, optional for create)",
          "example": 789
        },
        "remove_source_branch": {
          "type": "boolean",
          "description": "Remove the source branch when the merge request is accepted (optional for create and update)",
          "default": false,
          "example": true
        },
        "draft": {
          "type": "boolean",
          "description": "Mark the merge request as a draft (optional for create)",
          "default": false,
          "example": false
        },
        "state": {
          "type": "string",
          "enum": ["opened", "closed", "merged", "all"],
          "description": "Filter by merge request state",
          "default": "opened"
        },
        "scope": {
          "type": "string",
          "enum": ["created_by_me", "assigned_to_me", "reviews_for_me", "all"],
          "description": "Filter by merge request scope"
        },
        "search": {
          "type": "string",
          "description": "Search merge requests by title or description"
        },
        "in": {
          "type": "string",
          "description": "Search scope (title, description, or title,description)"
        },
        "labels": {
          "type": "string",
          "description": "Filter by labels (comma-separated)"
        },
        "milestone": {
          "type": "string",
          "description": "Filter by milestone title"
        },
        "assignee_id": {
          "type": "integer",
          "description": "Filter by assignee ID"
        },
        "assignee_username": {
          "type": "string",
          "description": "Filter by assignee username (single or comma-separated)"
        },
        "author_id": {
          "type": "integer",
          "description": "Filter by author ID"
        },
        "author_username": {
          "type": "string",
          "description": "Filter by author username"
        },
        "reviewer_id": {
          "type": "integer",
          "description": "Filter by reviewer ID"
        },
        "reviewer_username": {
          "type": "string",
          "description": "Filter by reviewer username"
        },
        "source_branch": {
          "type": "string",
          "description": "Filter by source branch"
        },
        "target_branch": {
          "type": "string",
          "description": "Filter by target branch"
        },
        "wip": {
          "type": "string",
          "description": "Filter draft merge requests (yes or no)"
        },
        "view": {
          "type": "string",
          "description": "Return simplified merge request fields (simple)"
        },
        "my_reaction_emoji": {
          "type": "string",
          "description": "Filter by your reaction emoji"
        },
        "with_labels_details": {
          "type": "boolean",
          "description": "Include extra label details in list responses"
        },
        "order_by": {
          "type": "string",
          "description": "Order results by supported fields"
        },
        "sort": {
          "type": "string",
          "enum": ["asc", "desc"],
          "description": "Sort results in asc or desc order",
          "default": "desc"
        },
        "updated_after": {
          "type": "string",
          "description": "Return merge requests updated on or after the given time (ISO 8601)"
        },
        "updated_before": {
          "type": "string",
          "description": "Return merge requests updated on or before the given time (ISO 8601)"
        },
        "created_after": {
          "type": "string",
          "description": "Return merge requests created on or after the given time (ISO 8601)"
        },
        "created_before": {
          "type": "string",
          "description": "Return merge requests created on or before the given time (ISO 8601)"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        },
        "note_id": {
          "type": "integer",
          "description": "The ID of the note",
          "required_for": ["update_note", "delete_note", "download_note_attachment", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"]
        },
        "award_id": {
          "type": "integer",
          "description": "The ID of the emoji reaction",
          "required_for": ["get_award_emoji", "delete_award_emoji", "get_note_award_emoji", "delete_note_award_emoji"]
        },
        "name": {
          "type": "string",
          "description": "Name of the emoji without colons",
          "required_for": ["create_award_emoji", "create_note_award_emoji"],
          "example": "thumbsup"
        },
        "body": {
          "type": "string",
          "description": "The content of the note or discussion",
          "required_for": ["create_note", "update_note", "create_discussion", "reply_discussion"],
          "minLength": 1,
          "example": "This looks good to me!"
        },
        "confidential": {
          "type": "boolean",
          "description": "Whether the note should be confidential",
          "default": false,
          "example": false
        },
        "state_event": {
          "type": "string",
          "enum": ["close", "reopen"],
          "description": "New state for the merge request (for update action)",
          "example": "close"
        },
        "discussion_locked": {
          "type": "boolean",
          "description": "Whether the merge request discussion is locked (for update action)",
          "default": false,
          "example": false
        }
      }
    },

    {
      "name": "get_merge_request_with_details",
      "description": "Get merge request with discussions and award emoji in a single call. Fetches MR details, discussions, and MR award emoji. Discussions are paginated - use page/per_page (default 50, max 100).",
      "composite": true,
      "partial_results": true,
      "metadata_params": ["project_id", "merge_request_iid"],
      "steps": [
        {
          "call": "GET /projects/{id}/merge_requests/{merge_request_iid}",
          "store_as": "merge_request"
        },
        {
          "call": "GET /projects/{id}/merge_requests/{merge_request_iid}/discussions",
          "store_as": "merge_request.discussions",
          "depends_on": ["merge_request"]
        },
        {
          "call": "GET /projects/{id}/merge_requests/{merge_request_iid}/award_emoji",
          "store_as": "merge_request.award_emoji",
          "depends_on": ["merge_request"]
        }
      ],
      "parameters": {
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "merge_request_iid": {
          "type": "integer",
          "description": "The internal ID of the merge request",
          "required": true
        },
        "sort": {
          "type": "string",
          "enum": ["asc", "desc"],
          "description": "Return notes sorted in created order",
          "default": "desc"
        },
        "page": {
          "type": "integer",
          "description": "Page number for discussions pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Number of discussions per page (max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_deploy_keys",
      "description": "List deploy keys available to the authenticated user. Actions: 'list'.",
      "metadata_params": ["action"],
      "operations": {
        "list": "getApiV4DeployKeys"
      },
      "response_fields": {
        "list": ["id", "title", "key", "created_at"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list"],
          "description": "Action to perform",
          "required": true
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_deploy_tokens",
      "description": "List deploy tokens available to the authenticated user. Actions: 'list'.",
      "metadata_params": ["action"],
      "operations": {
        "list": "getApiV4DeployTokens"
      },
      "response_fields": {
        "list": ["id", "name", "username", "expires_at"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list"],
          "description": "Action to perform",
          "required": true
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_group_deploy_tokens",
      "description": "Manage deploy tokens at group level. Actions: 'list', 'create'.",
      "metadata_params": ["action", "group_id"],
      "operations": {
        "list": "getApiV4GroupsIdDeployTokens",
        "create": "postApiV4GroupsIdDeployTokens"
      },
      "response_fields": {
        "list": ["id", "name", "username", "expires_at"],
        "create": ["id", "name", "username", "expires_at"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "create"],
          "description": "Action to perform",
          "required": true
        },
        "group_id": {
          "type": "string",
          "description": "Group ID (numeric like '36173' or short name like 'davidruzicka')",
          "required": true,
          "example": "davidruzicka"
        },
        "name": {
          "type": "string",
          "description": "Deploy token name",
          "required_for": ["create"],
          "example": "ci-token"
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Scopes for the deploy token",
          "example": ["read_repository", "read_registry"]
        },
        "expires_at": {
          "type": "string",
          "format": "date",
          "description": "Expiration date for the deploy token",
          "example": "2025-12-31"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_events",
      "description": "List recent events accessible to the authenticated user. Actions: 'list'.",
      "metadata_params": ["action"],
      "operations": {
        "list": "getApiV4Events"
      },
      "response_fields": {
        "list": ["id", "action_name", "target_type", "target_id", "created_at"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list"],
          "description": "Action to perform",
          "required": true
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_feature_flags",
      "description": "Manage instance feature flags. Actions: 'list', 'list_definitions', 'set', 'get', 'update', 'delete'.",
      "metadata_params": ["action", "name"],
      "operations": {
        "list": "getApiV4Features",
        "list_definitions": "getApiV4FeaturesDefinitions",
        "set": "postApiV4Features",
        "get": "getApiV4FeaturesName",
        "update": "postApiV4FeaturesName",
        "delete": "deleteApiV4FeaturesName"
      },
      "response_fields": {
        "list": ["name", "state", "gates"],
        "list_definitions": ["name", "description"],
        "set": ["name", "state"],
        "get": ["name", "state", "gates"],
        "update": ["name", "state"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "list_definitions", "set", "get", "update", "delete"],
          "description": "Action to perform",
          "required": true
        },
        "name": {
          "type": "string",
          "description": "Feature flag name",
          "required_for": ["set", "get", "update", "delete"],
          "example": "new_navigation"
        },
        "state": {
          "type": "string",
          "description": "Feature flag state",
          "example": "on"
        }
      }
    },

    {
      "name": "manage_unleash_feature_flags",
      "description": "Work with Unleash feature flags for a project. Actions: 'get_config', 'list_features', 'list_client_features', 'report_client_metrics', 'register_client'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "get_config": "getApiV4FeatureFlagsUnleashProjectId",
        "list_features": "getApiV4FeatureFlagsUnleashProjectIdFeatures",
        "list_client_features": "getApiV4FeatureFlagsUnleashProjectIdClientFeatures",
        "report_client_metrics": "postApiV4FeatureFlagsUnleashProjectIdClientMetrics",
        "register_client": "postApiV4FeatureFlagsUnleashProjectIdClientRegister"
      },
      "response_fields": {
        "get_config": ["version", "project"],
        "list_features": ["features"],
        "list_client_features": ["features"],
        "report_client_metrics": ["status"],
        "register_client": ["status"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["get_config", "list_features", "list_client_features", "report_client_metrics", "register_client"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "integer",
          "description": "Project ID",
          "required": true,
          "example": 12345
        },
        "metrics": {
          "type": "object",
          "properties": {},
          "description": "Client metrics payload",
          "required_for": ["report_client_metrics"]
        },
        "client": {
          "type": "object",
          "properties": {},
          "description": "Client registration payload",
          "required_for": ["register_client"]
        }
      }
    },

    {
      "name": "manage_dependency_proxy_cache",
      "description": "Manage dependency proxy cache for a group. Actions: 'purge'.",
      "metadata_params": ["action", "group_id"],
      "operations": {
        "purge": "deleteApiV4GroupsIdDependencyProxyCache"
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["purge"],
          "description": "Action to perform",
          "required": true
        },
        "group_id": {
          "type": "string",
          "description": "Group ID (numeric like '36173' or short name like 'davidruzicka')",
          "required": true,
          "example": "davidruzicka"
        }
      }
    },

    {
      "name": "manage_group_custom_attributes",
      "description": "Manage custom attributes for a group. Actions: 'list', 'get', 'set', 'delete'.",
      "metadata_params": ["action", "group_id", "key"],
      "operations": {
        "list": "getApiV4GroupsIdCustomAttributes",
        "get": "getApiV4GroupsIdCustomAttributesKey",
        "set": "putApiV4GroupsIdCustomAttributesKey",
        "delete": "deleteApiV4GroupsIdCustomAttributesKey"
      },
      "response_fields": {
        "list": ["key", "value"],
        "get": ["key", "value"],
        "set": ["key", "value"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get", "set", "delete"],
          "description": "Action to perform",
          "required": true
        },
        "group_id": {
          "type": "string",
          "description": "Group ID (numeric like '36173' or short name like 'davidruzicka')",
          "required": true,
          "example": "davidruzicka"
        },
        "key": {
          "type": "string",
          "description": "Custom attribute key",
          "required_for": ["get", "set", "delete"],
          "example": "team"
        },
        "value": {
          "type": "string",
          "description": "Custom attribute value",
          "required_for": ["set"],
          "example": "core"
        }
      }
    },

    {
      "name": "run_glql",
      "description": "Execute a GLQL query. Actions: 'query'.",
      "metadata_params": ["action"],
      "operations": {
        "query": "postApiV4Glql"
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["query"],
          "description": "Action to perform",
          "required": true
        },
        "glql_yaml": {
          "type": "string",
          "description": "GLQL YAML payload. Example:\nfields: id,title,author\ngroup: my-group\nlimit: 10\nsort: created desc\nquery: state = opened\nDocs: https://docs.gitlab.com/api/glql/",
          "required_for": ["query"],
          "example": "fields: id,title,author\ngroup: my-group\nlimit: 10\nsort: created desc\nquery: state = opened"
        }
      }
    },

    {
      "name": "manage_issues",
      "description": "Work with issues. Actions: 'list' (all issues in project), 'list_global' (issues across projects), 'get' (single issue details), 'create' (create new issue), 'update' (update issue), 'delete' (delete issue - admins only), 'list_notes' (get all comments), 'get_note' (single comment), 'create_note' (add comment), 'update_note' (edit comment), 'delete_note' (remove comment), 'list_discussions', 'get_discussion', 'create_discussion', 'reply_discussion', 'delete_discussion', 'set_discussion_resolved', 'list_note_award_emoji', 'get_note_award_emoji', 'create_note_award_emoji', 'delete_note_award_emoji'. Use 'list' to see all issues, filter by state (opened, closed, all). For actions that target a specific issue, pass 'issue_iid'. For 'create', pass 'title'. For note and discussion actions, pass 'body' and/or 'note_id' or 'discussion_id' as required.",
      "metadata_params": ["action", "project_id", "issue_iid", "note_id"],
      "operations": {
        "list": "getApiV4ProjectsIdIssues",
        "list_global": "getApiV4Issues",
        "get": "getApiV4ProjectsIdIssuesIssueIid",
        "create": "postApiV4ProjectsIdIssues",
        "update": "putApiV4ProjectsIdIssuesIssueIid",
        "delete": "deleteApiV4ProjectsIdIssuesIssueIid",
        "list_notes": "getApiV4ProjectsIdIssuesIssueIidNotes",
        "get_note": "getApiV4ProjectsIdIssuesIssueIidNotesNoteId",
        "create_note": "postApiV4ProjectsIdIssuesIssueIidNotes",
        "update_note": "putApiV4ProjectsIdIssuesIssueIidNotesNoteId",
        "delete_note": "deleteApiV4ProjectsIdIssuesIssueIidNotesNoteId",
        "list_discussions": "getApiV4ProjectsIdIssuesIssueIidDiscussions",
        "get_discussion": "getApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
        "create_discussion": "postApiV4ProjectsIdIssuesIssueIidDiscussions",
        "reply_discussion": "postApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionIdNotes",
        "delete_discussion": "deleteApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
        "set_discussion_resolved": "putApiV4ProjectsIdIssuesIssueIidDiscussionsDiscussionId",
        "list_note_award_emoji": "getApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmoji",
        "get_note_award_emoji": "getApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmojiAwardId",
        "create_note_award_emoji": "postApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmoji",
        "delete_note_award_emoji": "deleteApiV4ProjectsIdIssuesIssueIidNotesNoteIdAwardEmojiAwardId"
      },
      "response_fields": {
        "list": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "list_global": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "create": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at"],
        "update": ["id", "iid", "title", "description", "state", "web_url", "author", "created_at", "updated_at"],
        "list_notes": ["id", "body", "author", "created_at", "updated_at", "system", "confidential"],
        "get_note": ["id", "body", "author", "created_at", "updated_at", "system", "confidential", "attachment"],
        "create_note": ["id", "body", "author", "created_at", "system", "confidential"],
        "update_note": ["id", "body", "author", "created_at", "updated_at", "system", "confidential"],
        "list_discussions": ["id", "notes", "resolved"],
        "get_discussion": ["id", "notes", "resolved"],
        "create_discussion": ["id", "notes", "resolved"],
        "reply_discussion": ["id", "notes", "resolved"],
        "set_discussion_resolved": ["id", "notes", "resolved"],
        "list_note_award_emoji": ["id", "name", "user", "created_at"],
        "get_note_award_emoji": ["id", "name", "user", "created_at"],
        "create_note_award_emoji": ["id", "name", "user", "created_at"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "list_global", "get", "create", "update", "delete", "list_notes", "get_note", "create_note", "update_note", "delete_note", "list_discussions", "get_discussion", "create_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required_for": ["list", "get", "create", "update", "delete", "list_notes", "get_note", "create_note", "update_note", "delete_note", "list_discussions", "get_discussion", "create_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"],
          "example": "123"
        },
        "issue_iid": {
          "type": "integer",
          "description": "The internal ID of the issue",
          "required_for": ["get", "update", "delete", "list_notes", "get_note", "create_note", "update_note", "delete_note", "list_discussions", "get_discussion", "create_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"]
        },
        "note_id": {
          "type": "integer",
          "description": "The ID of the note",
          "required_for": ["get_note", "update_note", "delete_note", "list_note_award_emoji", "get_note_award_emoji", "create_note_award_emoji", "delete_note_award_emoji"]
        },
        "discussion_id": {
          "type": "string",
          "description": "The ID of the discussion",
          "required_for": ["get_discussion", "reply_discussion", "delete_discussion", "set_discussion_resolved"]
        },
        "award_id": {
          "type": "integer",
          "description": "The ID of the award emoji",
          "required_for": ["get_note_award_emoji", "delete_note_award_emoji"]
        },
        "name": {
          "type": "string",
          "description": "Emoji name (for award emoji actions)",
          "required_for": ["create_note_award_emoji"]
        },
        "state": {
          "type": "string",
          "enum": ["opened", "closed", "all"],
          "description": "Filter by issue state",
          "default": "opened"
        },
        "search": {
          "type": "string",
          "description": "Search issues by title or description"
        },
        "in": {
          "type": "string",
          "description": "Search scope (title, description, or title,description)"
        },
        "labels": {
          "type": "string",
          "description": "Filter by labels (comma-separated)"
        },
        "milestone": {
          "type": "string",
          "description": "Filter by milestone title"
        },
        "milestone_id": {
          "type": "string",
          "description": "Filter by milestone ID or special values like None/Any"
        },
        "assignee_id": {
          "type": "integer",
          "description": "Filter by assignee ID"
        },
        "author_id": {
          "type": "integer",
          "description": "Filter by author ID"
        },
        "scope": {
          "type": "string",
          "enum": ["created_by_me", "assigned_to_me", "all"],
          "description": "Issue scope"
        },
        "confidential": {
          "type": "boolean",
          "description": "Filter confidential issues"
        },
        "my_reaction_emoji": {
          "type": "string",
          "description": "Filter by your reaction emoji"
        },
        "non_archived": {
          "type": "boolean",
          "description": "Return issues only from non-archived projects"
        },
        "order_by": {
          "type": "string",
          "description": "Order results by supported fields"
        },
        "sort": {
          "type": "string",
          "description": "Sort results in asc or desc order",
          "required_for": ["list_notes"]
        },
        "updated_after": {
          "type": "string",
          "description": "Return issues updated on or after the given time (ISO 8601)"
        },
        "updated_before": {
          "type": "string",
          "description": "Return issues updated on or before the given time (ISO 8601)"
        },
        "activity_filter": {
          "type": "string",
          "description": "Filter issue notes by activity type (all_notes, only_comments, only_activity)",
          "required_for": ["list_notes"]
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        },
        "title": {
          "type": "string",
          "description": "The title of the issue (required for create)",
          "required_for": ["create"],
          "example": "Implement new feature"
        },
        "description": {
          "type": "string",
          "description": "The description of the issue (optional for create)",
          "example": "This implements the new feature requested by the team."
        },
        "state_event": {
          "type": "string",
          "enum": ["close", "reopen"],
          "description": "Change issue state (for update)"
        },
        "body": {
          "type": "string",
          "description": "The content of the note",
          "required_for": ["create_note", "update_note"],
          "example": "Looks good to me."
        },
        "resolved": {
          "type": "boolean",
          "description": "Resolve or unresolve discussion",
          "required_for": ["set_discussion_resolved"]
        },
        "assignee_ids": {
          "type": "array",
          "items": {
            "type": "integer"
          },
          "description": "The IDs of the users to assign the issue to (optional for create)",
          "example": [123, 456]
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "description": "The due date of the issue (optional for create)",
          "example": "2024-12-31"
        },
        "weight": {
          "type": "integer",
          "description": "The weight of the issue (optional for create)",
          "minimum": 0,
          "example": 5
        }
      }
    },

    {
      "name": "manage_project_badges",
      "description": "Manage badges for a project. Actions: 'list' (get all badges), 'get' (single badge by ID), 'create' (new badge with link_url and image_url), 'update' (modify existing badge), 'delete' (remove badge). Use 'list' when you want to see what badges exist, 'create' to add new ones. For 'get', 'update', and 'delete', pass 'badge_id'. For 'create', pass 'link_url' and 'image_url'.",
      "metadata_params": ["action", "project_id", "badge_id"],
      "operations": {
        "list": "getApiV4ProjectsIdBadges",
        "get": "getApiV4ProjectsIdBadgesBadgeId",
        "create": "postApiV4ProjectsIdBadges",
        "update": "putApiV4ProjectsIdBadgesBadgeId",
        "delete": "deleteApiV4ProjectsIdBadgesBadgeId"
      },
      "parameters": {
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "action": {
          "type": "string",
          "enum": ["list", "get", "create", "update", "delete"],
          "description": "Action to perform",
          "required": true
        },
        "badge_id": {
          "type": "integer",
          "description": "Badge ID",
          "required_for": ["get", "update", "delete"]
        },
        "link_url": {
          "type": "string",
          "description": "URL the badge links to",
          "required_for": ["create"]
        },
        "image_url": {
          "type": "string",
          "description": "URL of the badge image",
          "required_for": ["create"]
        },
        "name": {
          "type": "string",
          "description": "Human-readable badge name"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        }
      }
    },

    {
      "name": "manage_branches",
      "description": "Manage repository branches. Actions: 'list' (all branches, supports search/sort), 'get' (single branch details), 'create' (new branch from ref), 'delete' (remove branch), 'protect' (make protected), 'unprotect' (remove protection), 'exists' (check if branch exists). Use 'list' to see all branches, 'create' to make a new feature branch from main. For 'get', 'delete', 'protect', 'unprotect', and 'exists', pass 'branch'. For 'create', pass 'ref'.",
      "operations": {
        "list": "getApiV4ProjectsIdRepositoryBranches",
        "get": "getApiV4ProjectsIdRepositoryBranchesBranch",
        "create": "postApiV4ProjectsIdRepositoryBranches",
        "delete": "deleteApiV4ProjectsIdRepositoryBranchesBranch",
        "protect": "putApiV4ProjectsIdRepositoryBranchesBranchProtect",
        "unprotect": "putApiV4ProjectsIdRepositoryBranchesBranchUnprotect",
        "exists": "headApiV4ProjectsIdRepositoryBranchesBranch"
      },
      "parameters": {
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "action": {
          "type": "string",
          "enum": ["list", "get", "create", "delete", "protect", "unprotect", "exists"],
          "description": "Operation to perform on branches",
          "required": true
        },
        "branch": {
          "type": "string",
          "description": "Branch name",
          "required_for": ["get", "delete", "protect", "unprotect", "exists"]
        },
        "ref": {
          "type": "string",
          "description": "Source branch or commit SHA for new branch",
          "required_for": ["create"]
        },
        "search": {
          "type": "string",
          "description": "Search branches by name (for list action)"
        },
        "sort": {
          "type": "string",
          "enum": ["name_asc", "updated_asc", "updated_desc"],
          "description": "Sort order (for list action)"
        },
        "developers_can_push": {
          "type": "boolean",
          "description": "Allow developers to push (for protect action)"
        },
        "developers_can_merge": {
          "type": "boolean",
          "description": "Allow developers to merge (for protect action)"
        }
      }
    },

    {
      "name": "repository_commits",
      "description": "Repository commits and comparisons. Actions: 'list', 'get_commit', 'compare'.",
      "metadata_params": ["action", "project_id"],
      "operations": {
        "list": "getApiV4ProjectsIdRepositoryCommits",
        "get_commit": "getApiV4ProjectsIdRepositoryCommitsSha",
        "compare": "getApiV4ProjectsIdRepositoryCompare"
      },
      "response_fields": {
        "list": ["id", "short_id", "title", "message", "author_name", "author_email", "authored_date", "committed_date", "web_url"],
        "get_commit": ["id", "short_id", "title", "message", "author_name", "author_email", "authored_date", "committed_date", "web_url"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list", "get_commit", "compare"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID (numeric or URL-encoded path)",
          "required": true
        },
        "ref_name": {
          "type": "string",
          "description": "Branch, tag, or commit SHA to list commits from"
        },
        "path": {
          "type": "string",
          "description": "File path to filter commits, use URL-encoded slashes for nested paths"
        },
        "since": {
          "type": "string",
          "description": "Only commits after this date in ISO 8601 format"
        },
        "until": {
          "type": "string",
          "description": "Only commits before this date in ISO 8601 format"
        },
        "all": {
          "type": "boolean",
          "description": "Return all commits, including those not in the default branch"
        },
        "with_stats": {
          "type": "boolean",
          "description": "Include commit stats in the response"
        },
        "first_parent": {
          "type": "boolean",
          "description": "Return only the first parent of merge commits"
        },
        "page": {
          "type": "integer",
          "description": "Page number for pagination",
          "default": 1
        },
        "per_page": {
          "type": "integer",
          "description": "Items per page (recommended max 100)",
          "default": 50
        },
        "order": {
          "type": "string",
          "description": "Order commits, for example default or topo"
        },
        "sha": {
          "type": "string",
          "description": "Commit SHA",
          "required_for": ["get_commit"]
        },
        "from": {
          "type": "string",
          "description": "Source ref for compare",
          "required_for": ["compare"]
        },
        "to": {
          "type": "string",
          "description": "Target ref for compare",
          "required_for": ["compare"]
        }
      }
    },

    {
      "name": "repository_files",
      "description": "Repository files and tree. Actions: 'list_tree', 'get_file' (metadata + base64 content), 'get_raw' (raw content), 'create_file', 'update_file', 'delete_file'.",
      "metadata_params": ["action", "project_id", "file_path"],
      "operations": {
        "list_tree": "getApiV4ProjectsIdRepositoryTree",
        "get_file": "getApiV4ProjectsIdRepositoryFilesFilePath",
        "get_raw": "getApiV4ProjectsIdRepositoryFilesFilePathRaw",
        "create_file": "postApiV4ProjectsIdRepositoryFilesFilePath",
        "update_file": "putApiV4ProjectsIdRepositoryFilesFilePath",
        "delete_file": "deleteApiV4ProjectsIdRepositoryFilesFilePath"
      },
      "response_fields": {
        "get_file": ["file_name", "file_path", "size", "encoding", "content", "ref", "blob_id", "commit_id", "last_commit_id"]
      },
      "parameters": {
        "action": {
          "type": "string",
          "enum": ["list_tree", "get_file", "get_raw", "create_file", "update_file", "delete_file"],
          "description": "Action to perform",
          "required": true
        },
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "file_path": {
          "type": "string",
          "description": "URL-encoded full path to the file, e.g., 'src%2Findex.js'. Use %2F instead of '/'.",
          "required_for": ["get_file", "get_raw", "create_file", "update_file", "delete_file"]
        },
        "ref": {
          "type": "string",
          "description": "Branch name, tag, or commit SHA to read from (for list_tree/get_file/get_raw)",
          "required_for": ["get_file", "get_raw"]
        },
        "path": {
          "type": "string",
          "description": "Directory path within the repository (for list_tree)"
        },
        "branch": {
          "type": "string",
          "description": "Branch name for file operations",
          "required_for": ["create_file", "update_file", "delete_file"]
        },
        "content": {
          "type": "string",
          "description": "File content",
          "required_for": ["create_file", "update_file"]
        },
        "commit_message": {
          "type": "string",
          "description": "Commit message",
          "required_for": ["create_file", "update_file", "delete_file"]
        }
      }
    },

    {
      "name": "manage_access_requests",
      "description": "Manage access requests for projects or groups. Actions: 'list' (pending requests), 'approve' (grant access with access_level), 'deny' (reject request), 'request' (request access as current user). Use 'list' to see who requested access, 'approve' to grant it with specified access level (10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner). For 'approve' and 'deny', pass 'user_id'.",
      "operations": {
        "list_project": "getApiV4ProjectsIdAccessRequests",
        "list_group": "getApiV4GroupsIdAccessRequests",
        "approve_project": "putApiV4ProjectsIdAccessRequestsUserIdApprove",
        "approve_group": "putApiV4GroupsIdAccessRequestsUserIdApprove",
        "deny_project": "deleteApiV4ProjectsIdAccessRequestsUserId",
        "deny_group": "deleteApiV4GroupsIdAccessRequestsUserId",
        "request_project": "postApiV4ProjectsIdAccessRequests",
        "request_group": "postApiV4GroupsIdAccessRequests"
      },
      "parameters": {
        "resource_type": {
          "type": "string",
          "enum": ["project", "group"],
          "description": "Whether to operate on project or group",
          "required": true
        },
        "resource_id": {
          "type": "string",
          "description": "Project ID (numeric like '123' or URL-encoded path like 'group%2Fproject') or Group ID (numeric or short name like 'davidruzicka'). Note: For project paths, use URL-encoded format (e.g., 'group%2Fproject').",
          "required": true,
          "example": "davidruzicka"
        },
        "action": {
          "type": "string",
          "enum": ["list", "approve", "deny", "request"],
          "description": "Access request operation to perform",
          "required": true
        },
        "user_id": {
          "type": "integer",
          "description": "User ID of requester",
          "required_for": ["approve", "deny"]
        },
        "access_level": {
          "type": "integer",
          "description": "Access level to grant: 10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner",
          "default": 30
        }
      }
    },

    {
      "name": "list_project_jobs",
      "description": "List all CI/CD jobs for a project with optional status filtering. Use 'scope' parameter to filter by job status like ['failed', 'canceled', 'success', 'running', 'pending']. Useful for finding failed jobs or monitoring pipeline progress.",
      "operations": {
        "list": "listProjectJobs"
      },
      "parameters": {
        "project_id": {
          "type": "string",
          "description": "Project ID. Use numeric ID (e.g. '123') or URL-encoded path (e.g. 'group%2Fproject').",
          "required": true,
          "example": "123"
        },
        "scope": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Filter by job status (can specify multiple)"
        }
      }
    }
  ],

  "interceptors": {
    "array_format": "brackets",
    "auth": [
      {
        "type": "oauth",
        "priority": 0,
        "validation_endpoint": "user",
        "oauth_config": {
          "issuer": "${env:GITLAB_OAUTH_ISSUER}",
          "client_id": "${env:GITLAB_OAUTH_CLIENT_ID}",
          "client_secret": "${env:GITLAB_OAUTH_CLIENT_SECRET}",
          "scopes": ["api", "read_repository"],
          "redirect_uri": "${env:GITLAB_OAUTH_REDIRECT_URI}"
        }
      },
      {
        "type": "bearer",
        "priority": 1,
        "value_from_env": "GITLAB_TOKEN",
        "validation_endpoint": "personal_access_tokens/self"
      }
    ],
    "base_url": {
      "value_from_env": "GITLAB_API_BASE_URL",
      "default": "https://gitlab.com/api/v4"
    },
    "rate_limit": {
      "max_requests_per_minute": 600,
      "overrides": {
        "postApiV4ProjectsIdIssues": {
          "max_requests_per_minute": 10
        },
        "deleteApiV4ProjectsIdIssuesIssueIid": {
          "max_requests_per_minute": 5
        },
        "postApiV4ProjectsIdMergeRequests": {
          "max_requests_per_minute": 10
        },
        "deleteApiV4ProjectsIdMergeRequestsMergeRequestIid": {
          "max_requests_per_minute": 5
        },
        "postApiV4ProjectsIdMergeRequestsMergeRequestIidNotes": {
          "max_requests_per_minute": 30
        },
        "putApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId": {
          "max_requests_per_minute": 30
        },
        "deleteApiV4ProjectsIdMergeRequestsMergeRequestIidNotesNoteId": {
          "max_requests_per_minute": 10
        }
      }
    },
    "retry": {
      "max_attempts": 3,
      "backoff_ms": [1000, 2000, 4000],
      "retry_on_status": [429, 502, 503, 504]
    }
  }
}
