MCP Server for Hidden Markov Model Viterbi Decoder Skill - Pure Python Standard Library implementation of the Viterbi Dynamic Programming Algorithm (Rabiner). Computes the maximum a posteriori (MAP) path of latent states given an observation sequence.
Single tool 'decode_hmm' has a reasonable description (89 chars) and complete input schema with all parameters typed and described. However, the tool name lacks an action verb (should be 'run_viterbi_decode' or 'decode_sequence_viterbi'), violating naming conventions. Output schema is not documented, callers cannot see the structure of {optimal_path, log_prob}. No error handling guidance (what if observations is empty? what if matrices are malformed?). No parameter constraints (e.g., states must be non-empty, probabilities must sum to 1). The tool is READ_ONLY but lacks explicit idempotentHint annotation. Overall, the definition is skeletal, it works for a narrow use case but lacks production-grade polish.
Run Viterbi decoding using log-probabilities to prevent numerical underflow. Returns (optimal_state_sequence, path_log_prob).
Tool name 'decode_hmm' does not start with an action verb. Should be 'run_viterbi_decode', 'decode_sequence_viterbi', or similar to signal intent to LLMs.
Output schema not documented. Callers cannot see that the response contains {optimal_path: List[str], log_prob: float}. LLMs cannot plan downstream operations without knowing the output structure.
No error handling guidance. Tool does not document what happens if observations is empty, if matrices contain zero probabilities, or if state/observation names mismatch. LLMs receive no recovery hints.
Parameter constraints missing. No validation that states is non-empty, that initial_probs and transitions sum to 1, or that all observations exist in emissions. LLMs can pass invalid inputs.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 44 | 2026-07-28+ | v2 |
Tool marked READ_ONLY but lacks explicit idempotentHint annotation in schema. Agents cannot verify from the tool definition that repeated calls are safe.