Skip to main content
Glama

user_feedback

Request user feedback on project changes by providing the directory path and a summary. Facilitates human-in-the-loop workflows for testing complex desktop application interactions.

Instructions

Request user feedback for a given project directory and summary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_directoryYesFull path to the project directory
summaryYesShort, one-line summary of the changes

Implementation Reference

  • server.py:61-68 (handler)
    The primary handler and registration for the 'user_feedback' MCP tool. Decorated with @mcp.tool() to register it with FastMCP. Defines input schema via Annotated[ ] with Field descriptions. Executes by calling helper to launch feedback UI.
    @mcp.tool() def user_feedback( project_directory: Annotated[str, Field(description="Full path to the project directory")], summary: Annotated[str, Field(description="Short, one-line summary of the changes")], ) -> Dict[str, str]: """Request user feedback for a given project directory and summary""" return launch_feedback_ui(first_line(project_directory), first_line(summary))
  • Input schema and type annotations for the user_feedback tool parameters: project_directory (str) and summary (str), with descriptions provided via pydantic Field.
    def user_feedback( project_directory: Annotated[str, Field(description="Full path to the project directory")], summary: Annotated[str, Field(description="Short, one-line summary of the changes")], ) -> Dict[str, str]:
  • Key helper function that launches the Qt-based feedback_ui.py as a subprocess, passes project_directory and summary as prompt, waits for JSON output via temp file, and returns the feedback result dict.
    def launch_feedback_ui(project_directory: str, summary: str) -> dict[str, str]: # Create a temporary file for the feedback result with tempfile.NamedTemporaryFile(suffix=".json", delete=False) as tmp: output_file = tmp.name try: # Get the path to feedback_ui.py relative to this script script_dir = os.path.dirname(os.path.abspath(__file__)) feedback_ui_path = os.path.join(script_dir, "feedback_ui.py") # Run feedback_ui.py as a separate process # NOTE: There appears to be a bug in uv, so we need # to pass a bunch of special flags to make this work args = [ sys.executable, "-u", feedback_ui_path, "--project-directory", project_directory, "--prompt", summary, "--output-file", output_file ] result = subprocess.run( args, check=False, shell=False, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, stdin=subprocess.DEVNULL, close_fds=True ) if result.returncode != 0: raise Exception(f"Failed to launch feedback UI: {result.returncode}") # Read the result from the temporary file with open(output_file, 'r') as f: result = json.load(f) os.unlink(output_file) return result except Exception as e: if os.path.exists(output_file): os.unlink(output_file) raise e
  • Utility helper to extract the first line of a string, used to shorten project_directory and summary for UI args.
    def first_line(text: str) -> str: return text.split("\n")[0].strip()
  • TypedDict defining the structure of the feedback result returned by the UI, used internally: command_logs and user_feedback strings.
    class FeedbackResult(TypedDict): command_logs: str user_feedback: str

Other Tools

Related 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/mrexodia/user-feedback-mcp'

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