An agent trusts the tools an MCP (Model Context Protocol) server lists: their names, their descriptions, and their input schemas. The model reads the descriptions as guidance. So a server that quietly changes a description after your team approved it can steer the agent, a pattern known as a rug pull, and a new tool can appear that nobody reviewed.
The defence is an ordinary contract test. The team pins the approved tools/list in tools.lock.json, and CI fails when the live list differs. Version numbers may change; the tools may not, without a new approval.
Your task
Write the contract test against ToolShelf, a mock MCP server that speaks JSON-RPC at /mcp. On submit it runs against the approved server, a harmless version bump, a changed description, a new tool and a changed schema.