Skip to content

docs: add CLI and MCP example output showcases#102

Merged
carlos-alm merged 1 commit intomainfrom
docs/cli-mcp-examples
Feb 25, 2026
Merged

docs: add CLI and MCP example output showcases#102
carlos-alm merged 1 commit intomainfrom
docs/cli-mcp-examples

Conversation

@carlos-alm
Copy link
Contributor

Summary

  • Add docs/examples/CLI.md with real output examples from all CLI commands (build, stats, where, explain, context, fn, deps, fn-impact, impact, diff-impact, map, structure, hotspots, cycles, export, search, models, info, registry)
  • Add docs/examples/MCP.md with JSON tool call examples and responses for all 17 MCP tools
  • All examples are generated from codegraph analyzing its own codebase — shows users what to expect before installing

Test plan

  • Verify markdown renders correctly on GitHub
  • Confirm Mermaid diagrams render in the preview
  • Check all command examples match current CLI behavior

Add docs/examples/ with real command output from codegraph analyzing
itself, so users can see what to expect before installing.
@claude
Copy link

claude bot commented Feb 25, 2026

Claude finished @carlos-alm's task —— View job


PR Review: CLI and MCP Example Documentation

Todo List:

  • Read and analyze both new documentation files
  • Assess root cause and problem being solved
  • Check content quality and accuracy
  • Verify markdown formatting and structure
  • Provide final assessment with rating

Phase 1: Root Cause Analysis

Problem Being Solved: This PR addresses the lack of concrete usage examples for potential codegraph users. Users currently have to install the tool and run commands blindly to understand what output to expect. The documentation shows real examples from codegraph analyzing its own codebase.

Why This Approach: Using self-analysis examples is brilliant - it shows users exactly what they'll see when they run codegraph on a real project, and the examples are guaranteed to be current and accurate since they're from the actual codebase.

Risk Assessment: LOW - This is pure documentation with no code changes, configuration modifications, or test alterations.

Phase 2: Configuration Change Detection

NO HIGH-RISK CHANGES DETECTED - No configuration files, linting rules, or test settings modified.

Phase 3: Test Integrity

NO TEST CONCERNS - No test files modified or test expectations changed.

Phase 4: Content Quality Assessment

CLI.md Analysis:

  • Comprehensive coverage: All major CLI commands covered (build, stats, where, explain, context, fn, deps, fn-impact, impact, diff-impact, map, structure, hotspots, cycles, export, search, models, info, registry)
  • Real output examples: Uses actual output from codegraph analyzing itself - builds trust and shows realistic usage
  • Progressive complexity: Starts with simple commands and builds to more complex ones
  • Practical context: Shows both successful cases and edge cases (like incremental builds, cycles detection)
  • Well-structured markdown: Clear headers, proper code blocks, logical flow

MCP.md Analysis:

  • Tool completeness: Covers all 17 MCP tools with JSON request/response examples
  • AI assistant focused: Explains the value proposition for AI coding assistants clearly
  • Practical examples: Shows both simple queries and complex multi-step workflows
  • JSON accuracy: Request/response format matches MCP specification
  • Multi-repo coverage: Documents both single-repo (default) and multi-repo modes

Technical Accuracy:

  • Output formats match what the actual CLI produces
  • JSON tool call examples follow correct MCP patterns
  • File paths and line numbers are realistic and consistent
  • Command flags and options are accurately documented

Minor Observations:

  • Some examples show truncated output (...) which is realistic for long results
  • Mermaid diagrams are properly formatted for GitHub rendering
  • File sizes and metrics appear consistent with a real codebase

Root Cause Analysis

Problem Being Solved: Missing concrete usage examples that prevent potential users from understanding tool capabilities before installation.
Why This Approach: Self-analysis examples provide authentic, current, and trustworthy demonstrations of real-world usage.
Risk Assessment: Minimal risk - documentation-only changes with no code/config/test modifications.

Critical Concerns

None identified. This is high-quality documentation that addresses a real user need.

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: Excellent documentation that significantly improves user onboarding. The use of self-analysis examples is particularly clever and builds user confidence. Content is comprehensive, accurate, and well-structured. Only minor point preventing 5 stars is that this is documentation rather than core functionality improvement.

Additional Notes:

  • This PR directly supports user adoption by removing the barrier of "what will this tool actually show me?"
  • The examples demonstrate the tool's sophistication and practical value
  • Zero technical risk with clear user benefits

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Added comprehensive documentation showcasing real CLI and MCP output examples. docs/examples/CLI.md demonstrates all 18 CLI commands (build, stats, where, explain, context, fn, deps, fn-impact, impact, diff-impact, map, structure, hotspots, cycles, export, search, models, info, registry) with actual output from codegraph analyzing its own codebase. docs/examples/MCP.md provides JSON tool call examples and responses for all 17 MCP server tools, helping users understand what AI agents will receive when querying the graph. Both files serve as practical "before you install" references.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Documentation-only changes adding comprehensive CLI and MCP examples. No code changes, no logic changes, no runtime impact. Both files are well-structured markdown with accurate command references matching the actual CLI and MCP tool definitions in the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
docs/examples/CLI.md Comprehensive CLI command reference with real output examples from codegraph's own codebase, covering all 18 commands
docs/examples/MCP.md Complete MCP tool call examples and JSON responses for all 17 tools, showing real output from codegraph analyzing itself

Last reviewed commit: 57d4a8f

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@carlos-alm carlos-alm merged commit c59715a into main Feb 25, 2026
17 checks passed
@carlos-alm carlos-alm deleted the docs/cli-mcp-examples branch February 25, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant