A Python-based MCP server providing hooks, skills, and agents for Claude Code integration with support for tool scope guards, memory management, indexing, and async operations
This server presents 7 tools that are poorly suited to the MCP tool pattern. The tools are implemented as hook integration points for a personal Claude Code configuration system, not as composable agent tools. Critical issues: (1) Tool descriptions are lengthy narratives (200-400+ chars) focused on implementation internals rather than what an LLM should do with them. (2) Input schemas exist but are under-specified, most lack type definitions for nested objects, no enum constraints, no min/max bounds. (3) Tool names are noun-heavy descriptors (agent_tool_scope_guard, promotion_score_observer) rather than action verbs; they describe infrastructure rather than user intents. (4) No output schemas are documented. (5) Error handling is absent, tools either succeed or fail with no recovery guidance. (6) These are hook functions designed for internal system integration, not chat-facing tools for LLM agents. Treating them as MCP tools mismatches the tool pattern fundamentally.
PreToolUse(Edit|Write) hook: enforce each agent's declared `tools:` allowlist. Prevents agents from using Edit, Write, or NotebookEdit tools if they are not explicitly declared in the agent's frontmatter `tools:` field. Also conditionally gates Bash commands that appear to perform file writes based on agent declarations.
Universal async launcher for Claude Code hooks. Forks a hook subprocess as a detached process while reading stdin data once, then exits immediately to prevent blocking Claude Code. Handles platform differences (Unix vs Windows) for process detachment.
Build a trigger-phrase -> skill-name index from personal SKILL.md files. Scans ~/.claude/skills for SKILL.md files with machine-readable `triggers:` YAML fields in frontmatter, classifies trigger phrases by false-positive risk, and generates a JSON index for runtime use by keyword_router.py.
PostToolUse(Bash) hook: reindex gitnexus after a successful git commit. Detects successful git commits and automatically runs `npx gitnexus analyze` to refresh the code index in the target repository. Uses file locking to prevent duplicate concurrent reindexing.
PostToolUseFailure hook: error recovery guidance. Tracks tool failures in a JSONL log and suggests 4-tier recovery protocol when a tool fails repeatedly (3+ failures in recent calls).
Tool names are noun-heavy infrastructure descriptors, not action verbs. Patterns like 'agent_tool_scope_guard', 'promotion_score_observer', 'thematic_index_router' describe system components, not user-facing actions. LLMs cannot infer intent from these names.
Input schemas lack type specifications for nested objects. Example: 'tool_input' in agent_tool_scope_guard is defined as {'type':'object','description':'...'} with no properties defined. Parameters cannot be validated or correctly parsed by LLMs.
No output schemas documented for any tool. LLMs have no signal about what fields to expect in responses, making downstream tool chaining impossible and forcing wasteful discovery calls.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 21 | 2026-07-28+ | v2 |
OBSERVE-only shadow logger for the Adaptive Promotion Score heuristic. Computes proposed priority scores from experiment graph.yaml files using 5 factors (expected_value, falsifiability, information_gain, evidence_independence, expected_cost) and appends to shadow log without mutating any state.
Session end hook: route new wiki entries to thematic indices based on tags and content. Routes entries to Claude-Code.index.md, Lessons.index.md, or Projects.index.md by analyzing entry title, tags, and content patterns.
Descriptions are implementation-focused narratives (200-400+ chars) that explain internal architecture rather than guiding LLM tool selection. Example: agent_tool_scope_guard description explains frontmatter parsing and agent declarations at length, but never states 'Call this to check if an agent is allowed to use a tool'.
No error handling or recovery guidance. Tools have 'Risk' fields (WRITE, READ_ONLY) but no documented error cases, retryability, or what the LLM should do if the tool fails.
These tools are hook integration points, not composable agent tools. They are designed to run as subprocess handlers within the Claude Code system, not as independent MCP tools. Exposing them as tools misapplies the tool pattern to infrastructure code.