Paths/AI Engineer/Model Context Protocol / Defining an MCP Server
Describe the Tools a Server Exposes
A tool description is the model's only documentation. Write a search tool with a clear description and a JSON Schema for its arguments.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- File ~/mcp/tools.json exists○
- The tool is named search_docs○
- The tool has a description and an inputSchema○
- The schema marks the query argument as required○
02Walkthrough
1 of 3 revealed- 01
Write the tool manifest
A tool has a name, a description and an inputSchema. The description is what the model reads when it decides whether to call the tool - vague wording means wrong calls.
echo '{"tools": [{"name": "search_docs", "description": "Search the internal documentation for a keyword and return the three best matching sections", "inputSchema": {"type": "object", "properties": {"query": {"type": "string"}}, "required": ["query"]}}]}' > ~/mcp/tools.json - 2 locked · each failed submit reveals one
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list