Skip to content

Fix get_ticket_by_id output validation#29

Open
oijkn wants to merge 1 commit into
effytech:mainfrom
oijkn:fix/get-ticket-by-id-output
Open

Fix get_ticket_by_id output validation#29
oijkn wants to merge 1 commit into
effytech:mainfrom
oijkn:fix/get-ticket-by-id-output

Conversation

@oijkn
Copy link
Copy Markdown

@oijkn oijkn commented Apr 29, 2026

Summary

  • Restores structured output for get_ticket_by_id by registering it with the default @mcp.tool() decorator.
  • Fixes validation failures when Freshservice returns the ticket JSON object.

Root cause

get_ticket_by_id returns response.json() as a dictionary, but it was registered with
structured_output=False, which causes the MCP runtime to validate the result as unstructured text.

Validation

  • Ran python -m py_compile src/freshservice_mcp/server.py successfully.

Copilot AI review requested due to automatic review settings April 29, 2026 16:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes MCP output validation for get_ticket_by_id by restoring structured output registration, ensuring the tool can return Freshservice’s JSON object without being validated as plain text.

Changes:

  • Register get_ticket_by_id with the default @mcp.tool() decorator to enable structured output validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants