-
Notifications
You must be signed in to change notification settings - Fork 25
Documentation Standards
Shazzadul Islam edited this page Jul 29, 2025
·
5 revisions
This guide outlines the documentation requirements and standards for IoWarp MCP servers.
Each MCP server must include a comprehensive README.md file in its root directory.
-
Server Name and Description
- Clear, concise description of the server's purpose
- Key features and capabilities
-
Installation
- Prerequisites (Python version, dependencies)
- Installation instructions using
uv - Any environment-specific setup requirements
-
Configuration
- Required environment variables
- Optional configuration parameters
- Example configuration snippets
-
Available Tools
- List of all tools provided by the server
- Description of each tool's purpose
- Input parameters and expected outputs
- Usage examples
-
Usage Examples
- Basic usage scenarios
- Common workflows
- Code snippets demonstrating tool usage
-
Testing
- How to run tests
- Test coverage information
- Manual testing procedures
-
Development Status
- Current development phase
- Known limitations or issues
- Future planned features
Follow Google-style docstrings for all functions and classes:
def process_data(data: List[Dict], format_type: str = "json") -> str:
"""Process data and return formatted output.
Args:
data: List of dictionaries containing raw data
format_type: Output format ("json", "csv", "xml")
Returns:
Formatted string representation of the data
Raises:
ValueError: If format_type is not supported
TypeError: If data is not properly structured
"""- Use type hints for all function parameters and return values
- Import types from
typingmodule when needed - Use
Optionalfor nullable parameters
- Add inline comments for complex logic
- Explain non-obvious implementation decisions
- Document any workarounds or known issues
Each tool must have:
- Clear, descriptive name
- Comprehensive description explaining its purpose
- Complete parameter documentation with types and constraints
- Return value documentation with examples
- Use JSON Schema for input validation
- Document all schema properties
- Include examples for complex schemas
- Specify required vs optional fields
- Use clear, actionable error messages
- Include context about what went wrong
- Suggest potential solutions when possible
- Avoid technical jargon in user-facing messages
Document:
- Expected error conditions
- How errors are handled and reported
- Recovery strategies
- Logging behavior during errors
Maintain a CHANGELOG.md file with:
- Version numbers following semantic versioning
- Clear description of changes in each version
- Breaking changes highlighted prominently
- Migration guides for major version updates
Document:
- Minimum supported Python version
- Compatible MCP protocol versions
- Dependency version requirements
- Platform compatibility notes
- Provide working, tested examples
- Include complete context (imports, setup)
- Show both success and error cases
- Use realistic data in examples
- Show how to integrate with Claude Desktop
- Provide configuration file examples
- Include troubleshooting common integration issues
- Documentation updates required for all code changes
- Review documentation for accuracy during PR reviews
- Regular audits to ensure documentation stays current
- Use consistent formatting and terminology
- Write in clear, concise language
- Use active voice when possible
- Include visual aids (diagrams, screenshots) when helpful
- Use descriptive link text
- Provide alt text for images
- Ensure proper heading hierarchy
- Test with screen readers when possible