Skip to main content
Glama
saidsef

GitHub PR Issue Analyser

by saidsef

update_assignees

Assign users to GitHub issues or pull requests by specifying repository details and usernames to manage task ownership.

Instructions

Updates the assignees for a specific issue or pull request in a GitHub repository. Args: repo_owner (str): The owner of the repository. repo_name (str): The name of the repository. issue_number (int): The issue or pull request number to update. assignees (list[str]): A list of usernames to assign to the issue or pull request. Returns: Dict[str, Any]: The updated issue or pull request data as returned by the GitHub API if the update is successful. None: If an error occurs during the update process. Error Handling: Logs an error message and prints the traceback if the request fails or an exception is raised.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_ownerYes
repo_nameYes
issue_numberYes
assigneesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that executes the update_assignees tool logic. It sends a PATCH request to the GitHub Issues API endpoint to update the assignees list for the specified issue or pull request.
    def update_assignees(self, repo_owner: str, repo_name: str, issue_number: int, assignees: list[str]) -> Dict[str, Any]:
        """
        Updates the assignees for a specific issue or pull request in a GitHub repository.
        Args:
            repo_owner (str): The owner of the repository.
            repo_name (str): The name of the repository.
            issue_number (int): The issue or pull request number to update.
            assignees (list[str]): A list of usernames to assign to the issue or pull request.
        Returns:
            Dict[str, Any]: The updated issue or pull request data as returned by the GitHub API if the update is successful.
            None: If an error occurs during the update process.
        Error Handling:
            Logs an error message and prints the traceback if the request fails or an exception is raised.
        """
        logging.info(f"Updating assignees for issue/PR {repo_owner}/{repo_name}#{issue_number}")
        # Construct the issue URL
        issue_url = f"https://api.github.com/repos/{repo_owner}/{repo_name}/issues/{issue_number}"
        try:
            # Update the assignees
            response = requests.patch(issue_url, headers=self._get_headers(), json={
                'assignees': assignees
            }, timeout=TIMEOUT)
            response.raise_for_status()
            issue_data = response.json()
            logging.info("Assignees updated successfully")
            return issue_data
        except Exception as e:
            logging.error(f"Error updating assignees: {str(e)}")
            traceback.print_exc()
            return {"status": "error", "message": str(e)}
  • Registers all public methods from GitHubIntegration instance (self.gi), including update_assignees, as MCP tools via the register_tools method.
    def _register_tools(self):
        self.register_tools(self.gi)
        self.register_tools(self.ip)
  • The method that dynamically registers public methods (non-starting with _) of the GitHubIntegration class as MCP tools by calling self.mcp.add_tool(method). This registers update_assignees among others.
    def register_tools(self, methods: Any = None) -> None:
        for name, method in inspect.getmembers(methods):
            if (inspect.isfunction(method) or inspect.ismethod(method)) and not name.startswith("_"):
                self.mcp.add_tool(method)
  • Import of GitHubIntegration class, whose methods including update_assignees are later registered as tools.
    from .github_integration import GitHubIntegration as GI
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that this is a mutation operation ('Updates'), mentions error handling behavior (logging and printing traceback), and describes return values. However, it doesn't cover important behavioral aspects like authentication requirements, rate limits, whether it replaces or appends assignees, or what happens with invalid usernames.

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?

The description is well-structured with clear sections (Args, Returns, Error Handling) and front-loaded with the core purpose. However, the Error Handling section could be more concise, and some sentences are slightly verbose (e.g., 'as returned by the GitHub API if the update is successful').

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

Completeness4/5

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

Given the mutation nature (no annotations), 4 parameters with full semantic coverage in description, and an output schema that handles return values, the description is mostly complete. The main gaps are lack of usage guidance relative to siblings and insufficient behavioral context about how the update actually works (replace vs append, validation behavior).

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing clear documentation for all 4 parameters in the Args section. Each parameter is named, typed, and explained with semantic meaning beyond what the bare schema provides (e.g., 'issue_number' is for 'issue or pull request number', 'assignees' is 'a list of usernames').

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 clearly states the tool's purpose with specific verb ('Updates') and resource ('assignees for a specific issue or pull request in a GitHub repository'). It distinguishes from siblings like 'update_issue' or 'update_pr_description' by focusing specifically on assignee management.

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?

The description provides no guidance on when to use this tool versus alternatives like 'update_issue' (which might handle assignees among other fields) or 'create_issue' (for initial assignment). There's no mention of prerequisites, constraints, or typical use cases beyond the basic function.

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