-
Book Overview & Buying
-
Table Of Contents
Ship an MCP Server in Python - Fast
By :
MCP has three core primitives that you’ll use daily: Tools, Resources, and Prompts:
Treat tools like API functions with crisp contracts. Define clear parameter names and types. Write a plain-English description that an LLM will match from natural language. The description matters more than the function name; it’s the bridge between how users speak and how your server operates. Resources carry facts: a settings file, a short spec, or a small JSON schema. Keep them small and relevant so you don’t blow past context limits. Prompts are templates others can call; hand them a battle-tested prompt with variables rather than a wall of instructions.

Figure 1-1: Tools, resources, and templates work together to support capable, grounded agents.
Slow down here and make sure you get the shape right. In practice, sloppy parameter schemas and vague descriptions cause tool misfires. Overstuffed resources inflate cost and degrade answers. Weak prompt templates bury the signal in noise. Do the opposite: make tool descriptions specific, keep resources minimal but sufficient, and use prompts to standardize your best instructions across requests. This is the core of predictable behavior under a limited context window.
Change the font size
Change margin width
Change background colour