code-review-graph icon indicating copy to clipboard operation
code-review-graph copied to clipboard

MCP Error for architecture_map skill, dict instead of Message or string

Open dstier-git opened this issue 6 months ago • 1 comments

Ran on macOS, M4 Apple Silicon. Encountered issue when trying to use the architecture_map skill from within Claude Code.

See the output below:

/code-review-graph:architecture_map (MCP) ⎿ McpError: MCP error 0: Error rendering prompt 'architecture_map': messages[0] must be Message or str, got dict. Use Message({'role': 'user', 'content': '## Rules for Token-Efficient Graph Usage\n1. ALWAYS call get_minimal_context first with a task description.\n2. Use detail_level="minimal" on all tool calls unless the minimal output is insufficient.\n3. Only escalate to detail_level="standard" or "verbose" for the specific entities that need deeper inspection.\n4. Never request more than 3 tool calls per turn unless absolutely necessary.\n5. Prefer targeted queries (query_graph with a specific symbol) over broad scans (list_communities with full members).\n6. When reviewing changes: detect_changes(detail_level="minimal") → only expand on high-risk items.\n\n## Architecture Mapping Workflow\n1. Call get_minimal_context(task="map architecture").\n2. Call get_architecture_overview(detail_level="minimal") for community coupling summary.\n3. Call list_flows(detail_level="minimal") for critical flow names + criticality scores.\n4. Only call get_community(name=, detail_level="standard") for the 1-2 communities the user is most interested in.\n5. Produce a concise Mermaid diagram showing communities as boxes and key flows as arrows.'}) to wrap the value.

Issue also encountered for the pre_merge_check skill on Windows: issue

dstier-git avatar May 08 '26 21:05 dstier-git

Shipped in v2.3.4 via release PR #512: https://github.com/tirth8205/code-review-graph/releases/tag/v2.3.4. The FastMCP prompt compatibility fix wraps all prompt returns as Message objects, and CI passed against the current FastMCP dependency floor. Closing as completed.

tirth8205 avatar May 25 '26 12:05 tirth8205