Skip to main content
Glama
UtakataKyosui

PR Review MCP Server

reply_and_resolve

Reply to GitHub pull request review threads and resolve them in one action, streamlining code review feedback management.

Instructions

Reply to a review thread and immediately resolve it

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
pull_numberYesPull request number
thread_idYesReview thread ID (from list_review_threads)
bodyYesReply content (Markdown supported)

Implementation Reference

  • The handler function that implements the reply_and_resolve tool: extracts arguments, adds a reply to the thread, resolves the thread, and returns a JSON result.
    async def handle_reply_and_resolve(api: GitHubAPI, arguments: dict[str, Any]) -> list[TextContent]:
        """Handle reply_and_resolve tool call."""
    
        owner = arguments["owner"]
        repo = arguments["repo"]
        pull_number = arguments["pull_number"]
        thread_id = arguments["thread_id"]
        body = arguments["body"]
    
        # Get PR ID
        pr_id = api.get_pr_id(owner, repo, pull_number)
    
        # Add reply
        comment = api.add_thread_reply(pr_id, thread_id, body)
    
        # Resolve thread
        thread = api.resolve_thread(thread_id)
    
        result = {
            "success": True,
            "comment": {
                "id": comment.get("id"),
                "author": comment.get("author", {}).get("login"),
                "body": comment.get("body"),
                "created_at": comment.get("createdAt"),
            },
            "thread": {"id": thread.get("id"), "is_resolved": thread.get("isResolved", False)},
        }
    
        return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • Input schema defining parameters for the reply_and_resolve tool: owner, repo, pull_number, thread_id, body.
    inputSchema={
        "type": "object",
        "properties": {
            "owner": {
                "type": "string",
                "description": "Repository owner (username or organization)",
            },
            "repo": {"type": "string", "description": "Repository name"},
            "pull_number": {"type": "integer", "description": "Pull request number"},
            "thread_id": {
                "type": "string",
                "description": "Review thread ID (from list_review_threads)",
            },
            "body": {
                "type": "string",
                "description": "Reply content (Markdown supported)",
            },
        },
        "required": ["owner", "repo", "pull_number", "thread_id", "body"],
    },
  • Registration of the reply_and_resolve tool in the list_tools function, including name, description, and schema.
    Tool(
        name="reply_and_resolve",
        description="Reply to a review thread and immediately resolve it",
        inputSchema={
            "type": "object",
            "properties": {
                "owner": {
                    "type": "string",
                    "description": "Repository owner (username or organization)",
                },
                "repo": {"type": "string", "description": "Repository name"},
                "pull_number": {"type": "integer", "description": "Pull request number"},
                "thread_id": {
                    "type": "string",
                    "description": "Review thread ID (from list_review_threads)",
                },
                "body": {
                    "type": "string",
                    "description": "Reply content (Markdown supported)",
                },
            },
            "required": ["owner", "repo", "pull_number", "thread_id", "body"],
        },
    ),
  • Dispatch logic in call_tool that routes 'reply_and_resolve' calls to the handler function.
    elif name == "reply_and_resolve":
        return await handle_reply_and_resolve(api, arguments)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the action but lacks details on behavioral traits such as required permissions, whether the resolution is reversible, rate limits, or error handling. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core action without unnecessary words. Every part earns its place by clearly stating the tool's purpose and distinguishing it from siblings.

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 the complexity of a mutation tool with no annotations and no output schema, the description is minimally adequate. It covers the purpose and usage but lacks details on behavioral aspects and output, leaving gaps in completeness for effective agent use.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all five parameters. The description does not add any meaning beyond what the schema provides, such as explaining parameter interactions or usage context. Baseline 3 is appropriate when the schema handles parameter documentation.

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 specific action ('reply to a review thread and immediately resolve it'), identifying both the resource (review thread) and the dual operation (reply + resolve). It distinguishes from siblings like 'reply_to_review_thread' and 'resolve_review_thread' by combining both actions.

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

Usage Guidelines5/5

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

The description explicitly indicates when to use this tool versus alternatives by specifying 'immediately resolve it,' implying it should be used when you want to both reply and resolve in one step, as opposed to using separate 'reply_to_review_thread' and 'resolve_review_thread' tools for sequential operations.

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/UtakataKyosui/PR-Review-Resolve-MCP'

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