What problem does it solve?
Safely extending the AI Counsel MCP server with new tools while maintaining protocol compliance, stdio safety, and proper error handling is complex and error-prone. This skill provides a systematic approach to ensure new tools integrate seamlessly without corrupting communication or crashing the server.
Core Features & Use Cases
- Type-Safe Tool Definition: Define Pydantic models for tool requests and responses, ensuring robust input validation.
- Stdio Safety Enforcement: Learn critical rules to prevent stdout contamination, ensuring stable MCP communication.
- Structured Error Handling: Implement graceful error responses for validation and runtime failures, preventing server crashes.
- Use Case: Add a new MCP tool that allows AI models to interact with a custom internal API. This skill guides you through defining the tool's schema, creating its async handler, and ensuring all interactions are type-safe and protocol-compliant.
Quick Start
To begin, define a new Pydantic request model for your tool in models/schema.py with fields like parameter1: str and parameter2: int, including descriptive Field arguments.