Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

create_release

Create a new GitHub release by specifying repository, tag, name, body, and optional settings for draft, prerelease, and release notes.

Instructions

Creates a new release in the specified GitHub repository. Args: repo_owner (str): The owner of the repository. repo_name (str): The name of the repository. tag_name (str): The tag name for the release. release_name (str): The name of the release. body (str): The description or body content of the release. draft (bool, optional): Whether the release is a draft. Defaults to False. prerelease (bool, optional): Whether the release is a prerelease. Defaults to False. generate_release_notes (bool, optional): Whether to generate release notes automatically. Defaults to True. make_latest (Literal['true', 'false', 'legacy'], optional): Whether to mark the release as the latest. Defaults to 'true'. Returns: Dict[str, Any]: The JSON response from the GitHub API containing release information if successful. None: If an error occurs during the release creation process. Error Handling: Logs errors and prints the traceback if the release creation fails, returning None.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_ownerYes
repo_nameYes
tag_nameYes
release_nameYes
bodyYes
draftNo
prereleaseNo
generate_release_notesNo
make_latestNotrue

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The create_release method on GitHubIntegration class. It calls the GitHub API to create a release with parameters: repo_owner, repo_name, tag_name, release_name, body, draft, prerelease, generate_release_notes, make_latest.
    def create_release(
        self,
        repo_owner: str,
        repo_name: str,
        tag_name: str,
        release_name: str,
        body: str,
        draft: bool = False,
        prerelease: bool = False,
        generate_release_notes: bool = True,
        make_latest: Literal["true", "false", "legacy"] = "true",
    ) -> dict[str, Any]:
        """
        Creates a new release in the specified GitHub repository.
        Args:
            repo_owner (str): The owner of the repository.
            repo_name (str): The name of the repository.
            tag_name (str): The tag name for the release.
            release_name (str): The name of the release.
            body (str): The description or body content of the release.
            draft (bool, optional): Whether the release is a draft. Defaults to False.
            prerelease (bool, optional): Whether the release is a prerelease. Defaults to False.
            generate_release_notes (bool, optional): Whether to generate release notes automatically. Defaults to True.
            make_latest (Literal['true', 'false', 'legacy'], optional): Whether to mark the release as the latest. Defaults to 'true'.
        Returns:
            Dict[str, Any]: The JSON response from the GitHub API containing release information if successful.
            None: If an error occurs during the release creation process.
        Error Handling:
            Logs errors and prints the traceback if the release creation fails, returning None.
        """
        logger.info(f"Creating release {release_name} in {repo_owner}/{repo_name}")
    
        # Construct the releases URL
        releases_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/releases"
    
        try:
            # Create the release
            response = httpx.post(
                releases_url,
                headers=self._get_headers(),
                json={
                    "tag_name": tag_name,
                    "name": release_name,
                    "body": body,
                    "draft": draft,
                    "prerelease": prerelease,
                    "generate_release_notes": generate_release_notes,
                    "make_latest": make_latest,
                },
                timeout=TIMEOUT,
            )
            self._raise_for_status(response, f"create release {release_name}")
            release_data = response.json()
    
            logger.info("Release created successfully")
            return release_data
    
        except GitHubAuthError:
            raise
        except Exception as e:
            logger.error(f"Error creating release: {str(e)}")
            traceback.print_exc()
            return {"status": "error", "message": str(e)}
  • Registration: _register_tools() calls self.register_tools(self.gi) which iterates over all public methods of GitHubIntegration (including create_release) and adds them as MCP tools via self.mcp.add_tool(method).
    def _register_tools(self):
        self.register_tools(self.gi)
        self.register_tools(self.ip)
        self.mcp.add_provider(SkillsDirectoryProvider(Path(__file__).parent / "skills"))
    
    def register_tools(self, methods: Any = None) -> None:
        for name in dir(methods):
            if name.startswith("_"):
                continue
            method = getattr(methods, name)
            if inspect.isroutine(method):
                self.mcp.add_tool(method)
  • The register_tools method dynamically discovers all non-underscore-prefixed methods on the GitHubIntegration instance and registers them as MCP tools.
    def register_tools(self, methods: Any = None) -> None:
        for name in dir(methods):
            if name.startswith("_"):
                continue
            method = getattr(methods, name)
            if inspect.isroutine(method):
                self.mcp.add_tool(method)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses return type (Dict or None on error) and error handling (logs errors, returns None), but omits side effects like triggering CI or permission requirements. Acceptable but not thorough.

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

Conciseness4/5

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

Well-structured with Args, Returns, and Error Handling sections. Front-loaded with purpose. Slightly verbose but each sentence adds information; could trim redundancy.

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

Completeness3/5

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

Given 9 parameters and presence of output schema (though unseen), description covers parameter meanings and return behavior but lacks context about dependencies (e.g., tag must exist) or typical use cases. Adequate but leaves gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It lists all 9 parameters with types, defaults, and brief explanations (e.g., 'body: description or body content'). Adds meaningful value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Creates a new release in the specified GitHub repository,' clearly identifying the action and resource. It distinguishes from sibling tools that create other entities like issues or pull requests.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., create_tag), no prerequisites mentioned, and no context about typical workflow placement. The description is purely functional without usage recommendations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/saidsef/mcp-github-pr-issue-analyser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server