If you’re building a custom agent and want full control over the response format (typed objects, error handling), consider using the SDK directly instead of MCP:
MCP is ideal when your agent framework handles tool discovery and invocation. The SDK is better when you want typed responses and programmatic control.