[
  {
    "name": "actions_config_read",
    "description": "Read Actions secrets and variables.",
    "parameters": {
      "type": "object",
      "properties": {
        "method": { "type": "string", "enum": ["list_repo_secrets", "list_org_secrets", "list_repo_variables", "get_repo_variable", "list_org_variables", "get_org_variable"] },
        "name": { "type": "string", "description": "for get methods" },
        "org": { "type": "string", "description": "for org methods" },
        "owner": { "type": "string", "description": "for repo methods" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "minimum": 1, "description": "results per page" },
        "repo": { "type": "string", "description": "for repo methods" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "actions_config_write",
    "description": "Write Actions secrets and variables: upsert, create, update, delete.",
    "parameters": {
      "type": "object",
      "properties": {
        "data": { "type": "string", "description": "secret value (upsert)" },
        "description": { "type": "string" },
        "method": { "type": "string", "enum": ["upsert_repo_secret", "delete_repo_secret", "upsert_org_secret", "delete_org_secret", "create_repo_variable", "update_repo_variable", "delete_repo_variable", "create_org_variable", "update_org_variable", "delete_org_variable"] },
        "name": { "type": "string", "description": "secret or variable name" },
        "org": { "type": "string", "description": "for org methods" },
        "owner": { "type": "string", "description": "for repo methods" },
        "repo": { "type": "string", "description": "for repo methods" },
        "value": { "type": "string", "description": "variable value" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "actions_run_read",
    "description": "Read Actions workflows, runs, jobs, and logs.",
    "parameters": {
      "type": "object",
      "properties": {
        "job_id": { "type": "number", "description": "for log methods" },
        "max_bytes": { "type": "number", "default": 65536, "minimum": 1024, "description": "max log bytes" },
        "method": { "type": "string", "enum": ["list_workflows", "get_workflow", "list_runs", "get_run", "list_jobs", "list_run_jobs", "get_job_log_preview", "download_job_log"] },
        "output_path": { "type": "string", "description": "for 'download_job_log'" },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "minimum": 1, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" },
        "run_id": { "type": "number", "description": "for 'get_run'/'list_run_jobs'" },
        "status": { "type": "string", "description": "filter for 'list_runs'/'list_jobs'" },
        "tail_lines": { "type": "number", "default": 200, "minimum": 1, "description": "log tail lines" },
        "workflow_id": { "type": "string", "description": "ID or filename (for 'get_workflow')" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "actions_run_write",
    "description": "Write Actions runs: dispatch, cancel, rerun.",
    "parameters": {
      "type": "object",
      "properties": {
        "inputs": { "type": "object", "properties": {}, "description": "for 'dispatch_workflow'" },
        "method": { "type": "string", "enum": ["dispatch_workflow", "cancel_run", "rerun_run"] },
        "owner": { "type": "string", "description": "repo owner" },
        "ref": { "type": "string", "description": "branch or tag (for 'dispatch_workflow')" },
        "repo": { "type": "string", "description": "repo name" },
        "run_id": { "type": "number", "description": "for 'cancel_run'/'rerun_run'" },
        "workflow_id": { "type": "string", "description": "ID or filename (for 'dispatch_workflow')" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "create_branch",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "branch": { "type": "string" },
        "old_branch": { "type": "string", "description": "source branch (default: repo default)" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo", "branch"]
    }
  },
  {
    "name": "create_or_update_file",
    "description": "Create or update a file (provide sha to update an existing file).",
    "parameters": {
      "type": "object",
      "properties": {
        "branch_name": { "type": "string" },
        "content": { "type": "string" },
        "message": { "type": "string", "description": "commit message" },
        "new_branch_name": { "type": "string", "description": "new branch (create only)" },
        "owner": { "type": "string", "description": "repo owner" },
        "path": { "type": "string" },
        "repo": { "type": "string", "description": "repo name" },
        "sha": { "type": "string", "description": "existing file SHA (omit to create)" }
      },
      "required": ["owner", "repo", "path", "content", "message", "branch_name"]
    }
  },
  {
    "name": "create_release",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "body": { "type": "string" },
        "is_draft": { "type": "boolean" },
        "is_pre_release": { "type": "boolean" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "tag_name": { "type": "string" },
        "target": { "type": "string", "description": "commitish" },
        "title": { "type": "string" }
      },
      "required": ["owner", "repo", "tag_name", "target", "title"]
    }
  },
  {
    "name": "create_repo",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "auto_init": { "type": "boolean" },
        "default_branch": { "type": "string" },
        "description": { "type": "string" },
        "gitignores": { "type": "string" },
        "issue_labels": { "type": "string" },
        "license": { "type": "string" },
        "name": { "type": "string" },
        "object_format_name": { "type": "string", "enum": ["sha1", "sha256"] },
        "organization": { "type": "string", "description": "defaults to personal account" },
        "private": { "type": "boolean" },
        "readme": { "type": "string" },
        "template": { "type": "boolean" },
        "trust_model": { "type": "string", "enum": ["default", "collaborator", "committer", "collaboratorcommitter"] }
      },
      "required": ["name"]
    }
  },
  {
    "name": "create_tag",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "message": { "type": "string", "description": "tag message" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "tag_name": { "type": "string" },
        "target": { "type": "string", "description": "commitish" }
      },
      "required": ["owner", "repo", "tag_name"]
    }
  },
  {
    "name": "delete_branch",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "branch": { "type": "string" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo", "branch"]
    }
  },
  {
    "name": "delete_file",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "branch_name": { "type": "string" },
        "message": { "type": "string", "description": "commit message" },
        "owner": { "type": "string", "description": "repo owner" },
        "path": { "type": "string" },
        "repo": { "type": "string", "description": "repo name" },
        "sha": { "type": "string" }
      },
      "required": ["owner", "repo", "path", "message", "branch_name", "sha"]
    }
  },
  {
    "name": "delete_release",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo", "id"]
    }
  },
  {
    "name": "delete_tag",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "tag_name": { "type": "string" }
      },
      "required": ["owner", "repo", "tag_name"]
    }
  },
  {
    "name": "fork_repo",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "name": { "type": "string", "description": "fork name" },
        "organization": { "type": "string", "description": "target org" },
        "repo": { "type": "string" },
        "user": { "type": "string", "description": "owner of source repo" }
      },
      "required": ["user", "repo"]
    }
  },
  {
    "name": "get_commit",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "sha": { "type": "string" }
      },
      "required": ["owner", "repo", "sha"]
    }
  },
  {
    "name": "get_dir_contents",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "path": { "type": "string" },
        "ref": { "type": "string", "description": "branch, tag, or commit SHA" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo", "ref", "path"]
    }
  },
  {
    "name": "get_file_contents",
    "description": "Get file content and metadata",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "path": { "type": "string" },
        "ref": { "type": "string", "description": "branch, tag, or commit SHA" },
        "repo": { "type": "string", "description": "repo name" },
        "withLines": { "type": "boolean", "description": "return numbered lines" }
      },
      "required": ["owner", "repo", "ref", "path"]
    }
  },
  {
    "name": "get_gitea_mcp_server_version",
    "description": "",
    "parameters": { "type": "object", "properties": {} }
  },
  {
    "name": "get_latest_release",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "get_me",
    "description": "Get current user",
    "parameters": { "type": "object", "properties": {} }
  },
  {
    "name": "get_release",
    "description": "Get a release by ID",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number" },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo", "id"]
    }
  },
  {
    "name": "get_repository_tree",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "recursive": { "type": "boolean" },
        "repo": { "type": "string", "description": "repo name" },
        "tree_sha": { "type": "string", "description": "SHA, branch, or tag" }
      },
      "required": ["owner", "repo", "tree_sha"]
    }
  },
  {
    "name": "get_tag",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "tag_name": { "type": "string" }
      },
      "required": ["owner", "repo", "tag_name"]
    }
  },
  {
    "name": "get_user_orgs",
    "description": "List current user's organizations",
    "parameters": {
      "type": "object",
      "properties": {
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" }
      }
    }
  },
  {
    "name": "issue_read",
    "description": "Read issue: details, comments, or labels.",
    "parameters": {
      "type": "object",
      "properties": {
        "issue_number": { "type": "number" },
        "method": { "type": "string", "enum": ["get", "get_comments", "get_labels"] },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["method", "owner", "repo", "issue_number"]
    }
  },
  {
    "name": "issue_write",
    "description": "Write issues: create, update, manage comments and labels.",
    "parameters": {
      "type": "object",
      "properties": {
        "assignees": { "type": "array", "items": { "type": "string" } },
        "body": { "type": "string", "description": "required for 'create'/'add_comment'/'edit_comment'" },
        "commentID": { "type": "number", "description": "for 'edit_comment'" },
        "deadline": { "type": "string", "description": "ISO 8601" },
        "issue_number": { "type": "number", "description": "required except for 'create'" },
        "label_id": { "type": "number", "description": "for 'remove_label'" },
        "labels": { "type": "array", "items": { "type": "number" }, "description": "label IDs" },
        "method": { "type": "string", "enum": ["create", "update", "add_comment", "edit_comment", "add_labels", "remove_label", "replace_labels", "clear_labels"] },
        "milestone": { "type": "number" },
        "owner": { "type": "string", "description": "repo owner" },
        "ref": { "type": "string", "description": "branch to associate" },
        "remove_deadline": { "type": "boolean" },
        "repo": { "type": "string", "description": "repo name" },
        "state": { "type": "string", "enum": ["open", "closed", "all"] },
        "title": { "type": "string", "description": "required for 'create'" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "label_read",
    "description": "Read repo or org labels.",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number", "description": "label ID (for 'get_repo_label')" },
        "method": { "type": "string", "enum": ["list_repo_labels", "get_repo_label", "list_org_labels"] },
        "org": { "type": "string", "description": "for org methods" },
        "owner": { "type": "string", "description": "for repo methods" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "for repo methods" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "label_write",
    "description": "Write labels (repo or org): create, edit, delete.",
    "parameters": {
      "type": "object",
      "properties": {
        "color": { "type": "string", "description": "hex (#RRGGBB); required for create" },
        "description": { "type": "string" },
        "exclusive": { "type": "boolean", "description": "exclusive (org only)" },
        "id": { "type": "number", "description": "for edit/delete" },
        "is_archived": { "type": "boolean", "description": "archived (repo only)" },
        "method": { "type": "string", "enum": ["create_repo_label", "edit_repo_label", "delete_repo_label", "create_org_label", "edit_org_label", "delete_org_label"] },
        "name": { "type": "string", "description": "required for create" },
        "org": { "type": "string", "description": "for org methods" },
        "owner": { "type": "string", "description": "for repo methods" },
        "repo": { "type": "string", "description": "for repo methods" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "list_branches",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "list_commits",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "path": { "type": "string", "description": "only commits touching this path" },
        "per_page": { "type": "number", "default": 30, "minimum": 1, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" },
        "sha": { "type": "string", "description": "starting SHA or branch" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "list_issues",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "before": { "type": "string", "description": "updated before ISO 8601" },
        "labels": { "type": "array", "items": { "type": "string" }, "description": "label name filter" },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" },
        "since": { "type": "string", "description": "updated after ISO 8601" },
        "state": { "type": "string", "default": "all" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "list_my_repos",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "minimum": 1, "description": "results per page" }
      }
    }
  },
  {
    "name": "list_org_repos",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "org": { "type": "string" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 100, "minimum": 1, "description": "results per page" }
      },
      "required": ["org"]
    }
  },
  {
    "name": "list_pull_requests",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "milestone": { "type": "number" },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" },
        "sort": { "type": "string", "default": "recentupdate", "enum": ["oldest", "recentupdate", "leastupdate", "mostcomment", "leastcomment", "priority"] },
        "state": { "type": "string", "default": "all", "enum": ["open", "closed", "all"] }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "list_releases",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "is_draft": { "type": "boolean" },
        "is_pre_release": { "type": "boolean" },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 20, "minimum": 1, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "list_tags",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 20, "minimum": 1, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["owner", "repo"]
    }
  },
  {
    "name": "milestone_read",
    "description": "Read milestones: get one or list.",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number", "description": "for 'get'" },
        "method": { "type": "string", "enum": ["get", "list"] },
        "name": { "type": "string", "description": "name filter (for 'list')" },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "repo name" },
        "state": { "type": "string", "default": "all" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "milestone_write",
    "description": "Write milestones: create, update, delete.",
    "parameters": {
      "type": "object",
      "properties": {
        "description": { "type": "string" },
        "due_on": { "type": "string", "description": "due date" },
        "id": { "type": "number", "description": "for 'update'/'delete'" },
        "method": { "type": "string", "enum": ["create", "update", "edit", "delete"] },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "state": { "type": "string", "enum": ["open", "closed"] },
        "title": { "type": "string", "description": "for 'create'" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "notification_read",
    "description": "Read notifications: list (optionally scoped to a repo) or get a thread by ID.",
    "parameters": {
      "type": "object",
      "properties": {
        "before": { "type": "string", "description": "updated before ISO 8601" },
        "id": { "type": "number", "description": "thread ID (for 'get')" },
        "method": { "type": "string", "enum": ["list", "get"] },
        "owner": { "type": "string", "description": "scope 'list' to a repo" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "scope 'list' to a repo" },
        "since": { "type": "string", "description": "updated after ISO 8601" },
        "status": { "type": "string", "enum": ["unread", "read", "pinned"] },
        "subject_type": { "type": "string", "enum": ["Issue", "Pull", "Commit", "Repository"] }
      },
      "required": ["method"]
    }
  },
  {
    "name": "notification_write",
    "description": "Mark a notification or all notifications as read.",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number", "description": "thread ID (for 'mark_read')" },
        "last_read_at": { "type": "string", "description": "ISO 8601; defaults to now" },
        "method": { "type": "string", "enum": ["mark_read", "mark_all_read"] },
        "owner": { "type": "string", "description": "scope 'mark_all_read' to a repo" },
        "repo": { "type": "string", "description": "scope 'mark_all_read' to a repo" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "package_read",
    "description": "Read package registry: list packages (one entry per version, filter via 'q'/'type'), list versions, or get a version.",
    "parameters": {
      "type": "object",
      "properties": {
        "method": { "type": "string", "enum": ["list", "list_versions", "get"] },
        "name": { "type": "string", "description": "slashes auto-encoded; required except 'list'" },
        "owner": { "type": "string", "description": "user or org" },
        "page": { "type": "number", "default": 1, "minimum": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "minimum": 1, "description": "results per page" },
        "q": { "type": "string", "description": "search query" },
        "type": { "type": "string", "description": "container/npm/maven/pypi/cargo/generic; required except 'list'" },
        "version": { "type": "string", "description": "for 'get'" }
      },
      "required": ["method", "owner"]
    }
  },
  {
    "name": "package_write",
    "description": "Delete a package version (irreversible).",
    "parameters": {
      "type": "object",
      "properties": {
        "method": { "type": "string", "enum": ["delete"] },
        "name": { "type": "string", "description": "slashes auto-encoded" },
        "owner": { "type": "string", "description": "user or org" },
        "type": { "type": "string", "description": "container/npm/maven/pypi/cargo/generic" },
        "version": { "type": "string" }
      },
      "required": ["method", "owner", "type", "name", "version"]
    }
  },
  {
    "name": "pull_request_read",
    "description": "Read pull request: details, diff, changed files, head commit status, reviews.",
    "parameters": {
      "type": "object",
      "properties": {
        "binary": { "type": "boolean", "description": "include binary diff" },
        "method": { "type": "string", "enum": ["get", "get_diff", "get_files", "get_status", "get_reviews", "get_review", "get_review_comments"] },
        "owner": { "type": "string", "description": "repo owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "pull_number": { "type": "number" },
        "repo": { "type": "string", "description": "repo name" },
        "review_id": { "type": "number", "description": "for 'get_review'/'get_review_comments'" }
      },
      "required": ["method", "owner", "repo", "pull_number"]
    }
  },
  {
    "name": "pull_request_review_write",
    "description": "Write PR reviews: create, submit, delete, dismiss.",
    "parameters": {
      "type": "object",
      "properties": {
        "body": { "type": "string" },
        "comments": {
          "type": "array",
          "description": "inline comments (for 'create')",
          "items": {
            "type": "object",
            "properties": {
              "body": { "type": "string" },
              "new_line_num": { "type": "number", "description": "new-file line (additions)" },
              "old_line_num": { "type": "number", "description": "old-file line (deletions)" },
              "path": { "type": "string" }
            }
          }
        },
        "commit_id": { "type": "string", "description": "for 'create'" },
        "message": { "type": "string", "description": "dismissal reason" },
        "method": { "type": "string", "enum": ["create", "submit", "delete", "dismiss"] },
        "owner": { "type": "string", "description": "repo owner" },
        "pull_number": { "type": "number" },
        "repo": { "type": "string", "description": "repo name" },
        "review_id": { "type": "number", "description": "required except for 'create'" },
        "state": { "type": "string", "enum": ["APPROVED", "REQUEST_CHANGES", "COMMENT", "PENDING"] }
      },
      "required": ["method", "owner", "repo", "pull_number"]
    }
  },
  {
    "name": "pull_request_write",
    "description": "Write pull requests: create, update, close, reopen, merge, update branch from base, manage reviewers.",
    "parameters": {
      "type": "object",
      "properties": {
        "allow_maintainer_edit": { "type": "boolean", "description": "for 'update'" },
        "assignee": { "type": "string", "description": "for 'update'" },
        "assignees": { "type": "array", "items": { "type": "string" }, "description": "for 'update'" },
        "base": { "type": "string", "description": "base branch (required for 'create')" },
        "body": { "type": "string", "description": "required for 'create'; optional for 'update'" },
        "deadline": { "type": "string", "description": "ISO 8601" },
        "delete_branch": { "type": "boolean", "description": "for 'merge'" },
        "draft": { "type": "boolean", "description": "uses 'WIP: ' title prefix" },
        "force_merge": { "type": "boolean", "description": "merge even if checks fail" },
        "head": { "type": "string", "description": "head branch (required for 'create')" },
        "head_commit_id": { "type": "string", "description": "expected head SHA for conflict detection" },
        "labels": { "type": "array", "items": { "type": "number" }, "description": "label IDs" },
        "merge_style": { "type": "string", "default": "merge", "enum": ["merge", "rebase", "rebase-merge", "squash", "fast-forward-only"], "description": "for 'merge'" },
        "merge_when_checks_succeed": { "type": "boolean", "description": "for 'merge'" },
        "message": { "type": "string", "description": "merge commit message or dismissal reason" },
        "method": { "type": "string", "enum": ["create", "update", "close", "reopen", "merge", "update_branch", "add_reviewers", "remove_reviewers"] },
        "milestone": { "type": "number", "description": "for 'update'" },
        "owner": { "type": "string", "description": "repo owner" },
        "pull_number": { "type": "number", "description": "required except for 'create'" },
        "remove_deadline": { "type": "boolean", "description": "for 'update'" },
        "repo": { "type": "string", "description": "repo name" },
        "reviewers": { "type": "array", "items": { "type": "string" }, "description": "for 'add_reviewers'/'remove_reviewers'" },
        "state": { "type": "string", "description": "for 'update'", "enum": ["open", "closed"] },
        "team_reviewers": { "type": "array", "items": { "type": "string" }, "description": "for 'add_reviewers'/'remove_reviewers'" },
        "title": { "type": "string", "description": "required for 'create'; optional for 'update'/'merge'" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "search_issues",
    "description": "Search issues and PRs across repositories",
    "parameters": {
      "type": "object",
      "properties": {
        "labels": { "type": "string", "description": "comma-separated" },
        "owner": { "type": "string", "description": "filter by owner" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "query": { "type": "string" },
        "state": { "type": "string", "enum": ["open", "closed", "all"] },
        "type": { "type": "string", "enum": ["issues", "pulls"] }
      },
      "required": ["query"]
    }
  },
  {
    "name": "search_org_teams",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "includeDescription": { "type": "boolean" },
        "org": { "type": "string" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "query": { "type": "string" }
      },
      "required": ["org", "query"]
    }
  },
  {
    "name": "search_repos",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "isArchived": { "type": "boolean" },
        "isPrivate": { "type": "boolean" },
        "keywordInDescription": { "type": "boolean" },
        "keywordIsTopic": { "type": "boolean" },
        "order": { "type": "string" },
        "ownerID": { "type": "number" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "query": { "type": "string" },
        "sort": { "type": "string" }
      },
      "required": ["query"]
    }
  },
  {
    "name": "search_users",
    "description": "",
    "parameters": {
      "type": "object",
      "properties": {
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "query": { "type": "string" }
      },
      "required": ["query"]
    }
  },
  {
    "name": "timetracking_read",
    "description": "Read time tracking: issue times, repo times, active stopwatches, your tracked times.",
    "parameters": {
      "type": "object",
      "properties": {
        "issue_number": { "type": "number", "description": "for 'list_issue_times'" },
        "method": { "type": "string", "enum": ["list_issue_times", "list_repo_times", "get_my_stopwatches", "get_my_times"] },
        "owner": { "type": "string", "description": "for list_* methods" },
        "page": { "type": "number", "default": 1, "description": "page" },
        "per_page": { "type": "number", "default": 30, "description": "results per page" },
        "repo": { "type": "string", "description": "for list_* methods" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "timetracking_write",
    "description": "Write time tracking: stopwatches and entries.",
    "parameters": {
      "type": "object",
      "properties": {
        "id": { "type": "number", "description": "entry ID (for 'delete_time')" },
        "issue_number": { "type": "number" },
        "method": { "type": "string", "enum": ["start_stopwatch", "stop_stopwatch", "delete_stopwatch", "add_time", "delete_time"] },
        "owner": { "type": "string", "description": "repo owner" },
        "repo": { "type": "string", "description": "repo name" },
        "time": { "type": "number", "description": "seconds (for 'add_time')" }
      },
      "required": ["method"]
    }
  },
  {
    "name": "wiki_read",
    "description": "Read wiki: list pages, get content, revision history.",
    "parameters": {
      "type": "object",
      "properties": {
        "method": { "type": "string", "enum": ["list", "get", "get_revisions"] },
        "owner": { "type": "string", "description": "repo owner" },
        "pageName": { "type": "string", "description": "for 'get'/'get_revisions'" },
        "repo": { "type": "string", "description": "repo name" }
      },
      "required": ["method", "owner", "repo"]
    }
  },
  {
    "name": "wiki_write",
    "description": "Write wiki pages: create, update, delete.",
    "parameters": {
      "type": "object",
      "properties": {
        "content": { "type": "string", "description": "for 'create'/'update'" },
        "message": { "type": "string", "description": "commit message" },
        "method": { "type": "string", "enum": ["create", "update", "delete"] },
        "owner": { "type": "string", "description": "repo owner" },
        "pageName": { "type": "string", "description": "for 'update'/'delete'" },
        "repo": { "type": "string", "description": "repo name" },
        "title": { "type": "string", "description": "for 'create'" }
      },
      "required": ["method", "owner", "repo"]
    }
  }
]
