Skip to content

Commit

Permalink
minor enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
reminia committed Jan 9, 2025
1 parent 79daaf5 commit dca40e6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ wheels/
.idea/

.env

.env.prod
.env.dev
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ This server provides a comprehensive integration with Zendesk. It offers:
- Specialized prompts for ticket analysis and response drafting
- Full access to the Zendesk Help Center articles as knowledge base

## Usage

![demo](https://res.cloudinary.com/leecy-me/image/upload/v1736407570/open/zendesk_fjg4ow.gif)

## Setup

- build: `uv venv && uv pip install -e .` or `uv build` in short.
Expand Down
2 changes: 1 addition & 1 deletion src/zendesk_mcp_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ async def handle_call_tool(

elif name == "create_ticket_comment":
public = arguments.get("public", True)
result = zendesk_client.create_ticket_comment(
result = zendesk_client.post_comment(
ticket_id=arguments["ticket_id"],
comment=arguments["comment"],
public=public
Expand Down
6 changes: 3 additions & 3 deletions src/zendesk_mcp_server/zendesk_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def get_ticket_comments(self, ticket_id: int) -> List[Dict[str, Any]]:
except Exception as e:
raise Exception(f"Failed to get comments for ticket {ticket_id}: {str(e)}")

def create_ticket_comment(self, ticket_id: int, comment: str, public: bool = True) -> str:
def post_comment(self, ticket_id: int, comment: str, public: bool = True) -> str:
"""
Create a comment for an existing ticket.
Post a comment to an existing ticket.
"""
try:
ticket = self.client.tickets(id=ticket_id)
Expand All @@ -66,7 +66,7 @@ def create_ticket_comment(self, ticket_id: int, comment: str, public: bool = Tru
self.client.tickets.update(ticket)
return comment
except Exception as e:
raise Exception(f"Failed to create comment on ticket {ticket_id}: {str(e)}")
raise Exception(f"Failed to post comment on ticket {ticket_id}: {str(e)}")

def get_all_articles(self) -> Dict[str, Any]:
"""
Expand Down

0 comments on commit dca40e6

Please sign in to comment.