Skip to main content
Glama

Zerion MCP Server

by SAK1337
spec.md•3.91 kB
## ADDED Requirements ### Requirement: Test Infrastructure Setup The system SHALL include pytest-based testing infrastructure. #### Scenario: Test dependencies - **WHEN** project is set up for development - **THEN** pytest is listed in dev dependencies - **AND** pytest-asyncio is included for async tests - **AND** pytest-mock is included for mocking - **AND** pytest-cov is included for coverage #### Scenario: Test directory structure - **WHEN** tests are organized - **THEN** tests/ directory exists at project root - **AND** conftest.py provides shared fixtures - **AND** test files follow test_*.py naming convention ### Requirement: Configuration Testing The system SHALL test configuration loading and validation. #### Scenario: Valid config loading (test_config.py) - **WHEN** ConfigManager loads valid YAML - **THEN** all fields are accessible - **AND** types match expectations - **AND** no exceptions are raised #### Scenario: Environment override testing - **WHEN** environment variables are set - **THEN** they override config file values - **AND** precedence is correct - **AND** ConfigManager reflects overrides #### Scenario: Invalid config testing - **WHEN** required fields are missing - **THEN** ConfigError is raised - **AND** error message is descriptive - **AND** invalid value types are rejected ### Requirement: Error Handling Testing The system SHALL test all error scenarios. #### Scenario: Custom exception testing (test_errors.py) - **WHEN** error conditions are simulated - **THEN** correct exception type is raised - **AND** exception message is meaningful - **AND** exception includes proper context #### Scenario: Network error testing - **WHEN** network failures are mocked - **THEN** NetworkError is raised - **AND** error handling behaves correctly - **AND** no unhandled exceptions occur #### Scenario: API error testing - **WHEN** API returns error statuses (401, 429, 500) - **THEN** appropriate APIError is raised - **AND** error messages match expectations - **AND** response details are captured ### Requirement: Integration Testing The system SHALL include integration tests with mocked Zerion API. #### Scenario: Mock API fixtures (conftest.py) - **WHEN** integration tests run - **THEN** mock Zerion API is available - **AND** mock returns realistic responses - **AND** mock supports common endpoints #### Scenario: End-to-end flow testing (test_integration.py) - **WHEN** server initialization is tested - **THEN** OpenAPI spec is loaded (mocked) - **AND** MCP server is created - **AND** tools are registered - **AND** mock API calls succeed #### Scenario: Tool invocation testing - **WHEN** MCP tool is invoked in tests - **THEN** request is sent to mock API - **AND** response is properly formatted - **AND** MCP protocol is followed ### Requirement: Test Coverage The system SHALL measure and report test coverage. #### Scenario: Coverage measurement - **WHEN** tests run with coverage - **THEN** coverage report is generated - **AND** minimum 70% coverage is achieved - **AND** uncovered lines are identified #### Scenario: Coverage reporting - **WHEN** pytest runs with --cov flag - **THEN** terminal shows coverage summary - **AND** HTML report is generated - **AND** missing lines are highlighted ### Requirement: Test Execution The system SHALL support easy test execution. #### Scenario: Run all tests - **WHEN** `pytest` is executed - **THEN** all tests in tests/ are discovered - **AND** tests run in isolation - **AND** results are clearly reported #### Scenario: Run specific test module - **WHEN** `pytest tests/test_config.py` is executed - **THEN** only config tests run - **AND** other tests are skipped - **AND** execution is fast #### Scenario: Verbose output - **WHEN** `pytest -v` is executed - **THEN** detailed test names are shown - **AND** pass/fail status is clear - **AND** failure details include stack traces

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SAK1337/myzerionmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server