Skip to main content
Glama

resolve_review_thread

Mark GitHub pull request review threads as resolved to close discussions and track feedback completion.

Instructions

Mark a review thread as resolved

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesReview thread ID (from list_review_threads)

Implementation Reference

  • The handler function that executes the resolve_review_thread tool: extracts thread_id from arguments, calls GitHubAPI.resolve_thread, formats success response with thread info.
    async def handle_resolve_review_thread( api: GitHubAPI, arguments: dict[str, Any] ) -> list[TextContent]: """Handle resolve_review_thread tool call.""" thread_id = arguments["thread_id"] # Resolve thread thread = api.resolve_thread(thread_id) result = { "success": True, "thread": {"id": thread.get("id"), "is_resolved": thread.get("isResolved", False)}, } return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • Registers the resolve_review_thread tool with the MCP server in list_tools(), including name, description, and input schema.
    Tool( name="resolve_review_thread", description="Mark a review thread as resolved", inputSchema={ "type": "object", "properties": { "thread_id": { "type": "string", "description": "Review thread ID (from list_review_threads)", } }, "required": ["thread_id"], }, ), Tool(
  • Defines the input schema for the resolve_review_thread tool: requires 'thread_id' string.
    inputSchema={ "type": "object", "properties": { "thread_id": { "type": "string", "description": "Review thread ID (from list_review_threads)", } }, "required": ["thread_id"], }, ), Tool(
  • Helper method in GitHubAPI that performs the GraphQL mutation to resolve a review thread and returns the updated thread object.
    def resolve_thread(self, thread_id: str) -> dict[str, Any]: """ Resolve a review thread. Args: thread_id: Review thread node ID Returns: Updated thread object """ query = """ mutation ResolveThread($threadId: ID!) { resolveReviewThread(input: { threadId: $threadId }) { thread { id isResolved } } } """ variables = {"threadId": thread_id} data = self.execute_graphql(query, variables) thread = data.get("resolveReviewThread", {}).get("thread", {}) if not thread: raise GitHubAPIError("Failed to resolve thread") return thread
  • Dispatcher in call_tool() that routes 'resolve_review_thread' calls to the handler function.
    elif name == "resolve_review_thread": return await handle_resolve_review_thread(api, arguments)

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