Title: Quiz 10 — Agent-Native CLI Tools and MCP Servers
Course: AIINFRA 300: Agentic AI & the Model Context Protocol (MCP) > Section: Week 10 — Building Agent-Native CLI Tools and MCP Servers

Q: Why can a well-designed CLI be a better agent tool surface than raw HTTP API calls?
- It hides all errors from the model
- It can package common workflows into predictable, structured commands with fewer round trips
- It prevents the need for authentication
- It only works for local files
A: It can package common workflows into predictable, structured commands with fewer round trips

Q: An agent-native CLI should usually support a structured output mode such as --json.
- True
- False
A: True

Q: What is the best reason to put API-calling logic in a shared module such as weather_core.py?
- So the CLI and MCP server can reuse the same tested behavior instead of drifting apart
- So the MCP server can print debug logs to stdout
- So no error handling is needed
- So the CLI can avoid documenting flags
A: So the CLI and MCP server can reuse the same tested behavior instead of drifting apart

Q: Name three checks a useful doctor command might perform.
Feedback: Sample/expected answer: Examples: required environment variables/config are present, the API base URL is reachable, authentication succeeds, token looks non-empty, local cache/database is readable, or a simple read-only endpoint returns 200.

Q: In MCP, which primitive is the best fit for a model-controlled action that calls an API?
- Prompt
- Resource
- Tool
- Course module
A: Tool

Q: A CLI command and an MCP tool can wrap the same underlying API client function.
- True
- False
A: True

Q: Which CLI feature best supports safe experimentation with write-capable APIs?
- `--dry-run`
- Hiding all output
- Random command names
- Printing secrets for debugging
A: `--dry-run`

Q: What is one risk of wrapping every API endpoint one-for-one without designing higher-level commands?
Feedback: Sample/expected answer: The CLI may be broad but not useful: agents still need many calls, manual joins, pagination handling, and domain reasoning before they can answer the user's real task.