#
Quiz 1: MCP Server Implementation

Test your knowledge of MCP server concepts and implementation for the Pull Request Agent.

###
Q1: What is the primary role of an MCP Server in the Pull Request Agent architecture?

To host the user interface for the application To expose tools and resources that the AI agent can use to interact with GitHub To expose tools for reading and updating model repository tags on the Hugging Face Hub To train the AI model on pull request data

###
Q2: In the FastMCP implementation, why must all MCP tool functions return strings instead of Python objects?

To improve performance by reducing memory usage To ensure reliable data exchange between the MCP server and client To make the code easier to debug To comply with Hugging Face Hub API requirements

###
Q3: When implementing the add_new_tag tool, what is the purpose of checking if a tag already exists before creating a pull request?

To reduce API calls and improve performance To prevent creating duplicate pull requests and provide better user feedback To comply with Hugging Face Hub rate limits To ensure the tag format is valid

###
Q4: In the MCP server implementation, what happens when a model repository doesn’t have an existing README.md file?

The add_new_tag tool will fail with an error The tool creates a new ModelCard with ModelCardData and proceeds with the tag addition The tool skips adding the tag and returns a warning The tool automatically creates a default README with placeholder content

###
Q5: What is the significance of using create_pr=True in the hf_api.create_commit() function call?

It makes the commit directly to the main branch It automatically creates a pull request instead of committing directly to the main branch It creates a private branch that only the repository owner can see It validates the commit before creating it

###
Q6: Why does the MCP server implementation use extensive logging with emojis throughout the code?

To make the code more fun and engaging for developers To help with debugging and monitoring when the server runs autonomously in response to Hub events To comply with FastMCP logging requirements To reduce the amount of text in log files

Congrats on finishing this Quiz 🥳! If you need to review any elements, take the time to revisit the chapter to reinforce your knowledge.

< > Update on GitHub