report
Submit feedback on search utility with optional notes to help Giskard improve semantic web search quality.
Instructions
Report whether the search was useful. Helps Giskard improve.
useful: True if the result helped you, False if it didn't
note: optional — what was missing or what worked wellInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| useful | Yes | ||
| note | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:142-157 (registration)The report tool is registered using the @mcp.tool() decorator from FastMCP, which registers it as an MCP tool
@mcp.tool() def report(useful: bool, note: str = "") -> str: """Report whether the search was useful. Helps Giskard improve. useful: True if the result helped you, False if it didn't note: optional — what was missing or what worked well """ entry = { "ts": datetime.utcnow().isoformat(), "useful": useful, "note": note, "service": "search", } with open(FEEDBACK_FILE, "a") as f: f.write(json.dumps(entry) + "\n") return "Feedback recorded. Thank you." - server.py:143-157 (handler)The handler function for the 'report' tool. It records user feedback about search usefulness to a JSONL file. Takes a boolean 'useful' parameter and optional 'note' string, writes timestamped entry to feedback.jsonl, and returns confirmation message.
def report(useful: bool, note: str = "") -> str: """Report whether the search was useful. Helps Giskard improve. useful: True if the result helped you, False if it didn't note: optional — what was missing or what worked well """ entry = { "ts": datetime.utcnow().isoformat(), "useful": useful, "note": note, "service": "search", } with open(FEEDBACK_FILE, "a") as f: f.write(json.dumps(entry) + "\n") return "Feedback recorded. Thank you." - server.py:32-32 (helper)Helper constant defining the path to the feedback file where report entries are stored (feedback.jsonl)
FEEDBACK_FILE = Path(__file__).parent / "feedback.jsonl"