Skip to content

Merge branch 'mcp-tool' of https://github.com/redpanda-data/docs-exte…

0612500
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

Doc Tools MCP Server #157

Merge branch 'mcp-tool' of https://github.com/redpanda-data/docs-exte…
0612500
Select commit
Loading
Failed to load commit list.
GitHub Actions / MCP Test Results succeeded Dec 15, 2025 in 1s

149 passed, 0 failed and 0 skipped

Tests passed successfully

✅ test-results/junit.xml

149 tests were completed in 122s with 149 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
CLI Contract Tests 58✅ 115s
MCP Server Library - Constants 72✅ 2s
MCP Tools Integration Tests 19✅ 121s

✅ CLI Contract Tests

CLI Contract Tests › Command Structure
  ✅ generate command exists
  ✅ get-redpanda-version command exists
  ✅ get-console-version command exists
CLI Contract Tests › Generate Subcommands › property-docs
  ✅ property-docs command exists
  ✅ property-docs supports required flag --tag
  ✅ property-docs supports optional flag --generate-partials
  ✅ property-docs supports optional flag --cloud-support
  ✅ property-docs supports optional flag --overrides
CLI Contract Tests › Generate Subcommands › metrics-docs
  ✅ metrics-docs command exists
  ✅ metrics-docs supports required flag --tag
CLI Contract Tests › Generate Subcommands › rpk-docs
  ✅ rpk-docs command exists
  ✅ rpk-docs supports required flag --tag
CLI Contract Tests › Generate Subcommands › rpcn-connector-docs
  ✅ rpcn-connector-docs command exists
  ✅ rpcn-connector-docs supports optional flag --fetch-connectors
  ✅ rpcn-connector-docs supports optional flag --draft-missing
  ✅ rpcn-connector-docs supports optional flag --update-whats-new
  ✅ rpcn-connector-docs supports optional flag --include-bloblang
  ✅ rpcn-connector-docs supports optional flag --data-dir
  ✅ rpcn-connector-docs supports optional flag --old-data
  ✅ rpcn-connector-docs supports optional flag --csv
  ✅ rpcn-connector-docs supports optional flag --overrides
CLI Contract Tests › Generate Subcommands › helm-spec
  ✅ helm-spec command exists
  ✅ helm-spec supports optional flag --chart-dir
  ✅ helm-spec supports optional flag --tag
  ✅ helm-spec supports optional flag --readme
  ✅ helm-spec supports optional flag --output-dir
  ✅ helm-spec supports optional flag --output-suffix
CLI Contract Tests › Generate Subcommands › cloud-regions
  ✅ cloud-regions command exists
  ✅ cloud-regions supports optional flag --output
  ✅ cloud-regions supports optional flag --format
  ✅ cloud-regions supports optional flag --owner
  ✅ cloud-regions supports optional flag --repo
  ✅ cloud-regions supports optional flag --path
  ✅ cloud-regions supports optional flag --ref
  ✅ cloud-regions supports optional flag --template
  ✅ cloud-regions supports optional flag --dry-run
CLI Contract Tests › Generate Subcommands › crd-spec
  ✅ crd-spec command exists
  ✅ crd-spec supports optional flag --tag
  ✅ crd-spec supports optional flag --branch
  ✅ crd-spec supports optional flag --source-path
  ✅ crd-spec supports optional flag --depth
  ✅ crd-spec supports optional flag --templates-dir
  ✅ crd-spec supports optional flag --output
CLI Contract Tests › Generate Subcommands › bundle-openapi
  ✅ bundle-openapi command exists
  ✅ bundle-openapi supports required flag --tag
  ✅ bundle-openapi supports optional flag --repo
  ✅ bundle-openapi supports optional flag --surface
  ✅ bundle-openapi supports optional flag --out-admin
  ✅ bundle-openapi supports optional flag --out-connect
  ✅ bundle-openapi supports optional flag --admin-major
  ✅ bundle-openapi supports optional flag --use-admin-major-version
  ✅ bundle-openapi supports optional flag --quiet
CLI Contract Tests › Output Format Contracts
  ✅ get-redpanda-version outputs expected format
  ✅ get-console-version outputs expected format
CLI Contract Tests › Error Handling Contracts
  ✅ missing required parameter produces error
  ✅ invalid flag produces error
  ✅ nonexistent command produces error
CLI Contract Tests › Version Compatibility
  ✅ doc-tools version is available

✅ MCP Server Library - Constants

MCP Server Library - Constants
  ✅ should have correct MAX_RECURSION_DEPTH
  ✅ should have correct MAX_EXEC_BUFFER_SIZE
  ✅ should have correct DEFAULT_SKIP_DIRS
  ✅ should have correct PLAYBOOK_NAMES
MCP Server Library - Repository Detection › findRepoRoot
  ✅ should detect git repository
  ✅ should detect npm package repository
  ✅ should return current directory when no repo found
  ✅ should return repo type information
MCP Server Library - Repository Detection › Command Validation
  ✅ should reject dangerous command (semicolon): generate property-docs; rm -rf /
  ✅ should reject dangerous command (pipe): generate property-docs | cat /etc/passwd
  ✅ should reject dangerous command (ampersand): generate property-docs && malicious-comm
  ✅ should reject dangerous command (command substitution): generate property-docs $(malicious)
  ✅ should reject dangerous command (backtick): generate property-docs `malicious`
  ✅ should reject dangerous command (redirection): generate property-docs > /etc/passwd
  ✅ should reject dangerous command (redirection): generate property-docs < /etc/passwd
  ✅ should reject dangerous command (path traversal): generate ../../../etc/passwd
  ✅ should reject dangerous command (tilde expansion): generate ~/sensitive-file
  ✅ should allow safe command: generate property-docs --tag v25.3.1
  ✅ should allow safe command: generate metrics-docs --branch main
  ✅ should allow safe command: generate rp-connect-docs
  ✅ should allow safe command: help
  ✅ should allow safe command: version
  ✅ should reject empty string
  ✅ should reject null
  ✅ should reject undefined
  ✅ should reject non-string types
MCP Server Library - Repository Detection › getAntoraStructure
  ✅ should accept both string and object repoRoot parameter
  ✅ should find playbook in priority order
  ✅ should handle playbook parsing errors gracefully
  ✅ should skip directories in skip list
  ✅ should use custom skip list when provided
  ✅ should prevent symlink loops
  ✅ should respect MAX_RECURSION_DEPTH
  ✅ should parse antora.yml files and detect modules
  ✅ should detect module directories (pages, partials, etc)
  ✅ should detect doc-tools availability
  ✅ should return false for hasDocTools when not available
  ✅ should handle permission errors gracefully
  ✅ should handle antora.yml parsing errors
  ✅ should return complete structure with all fields
MCP Server Library - Repository Detection › executeTool
  ✅ should return error for unknown tool
  ✅ should validate command for run_doc_tools_command
  ✅ should call getAntoraStructure for get_antora_structure tool
MCP Server Library - Repository Detection › Version Information Tools › getRedpandaVersion
  ✅ should return version information for stable release
  ✅ should return version information for beta release
  ✅ should handle missing docker repo in output
  ✅ should handle command execution errors
  ✅ should handle malformed output
MCP Server Library - Repository Detection › Version Information Tools › getConsoleVersion
  ✅ should return Console version information
  ✅ should handle missing docker repo in output
  ✅ should handle command execution errors
  ✅ should handle malformed output
MCP Server Library - Repository Detection › Documentation Generation Tools › generatePropertyDocs
  ✅ should generate property docs with default options
  ✅ should generate property docs with partials
  ✅ should normalize version without v prefix
  ✅ should handle latest version
  ✅ should return error when doc-tools not found
  ✅ should default to dev branch when no parameters provided
  ✅ should handle command execution errors
MCP Server Library - Repository Detection › Documentation Generation Tools › generateMetricsDocs
  ✅ should generate metrics docs
  ✅ should normalize version
  ✅ should return error when doc-tools not found
  ✅ should default to dev branch when no parameters provided
MCP Server Library - Repository Detection › Documentation Generation Tools › generateRpkDocs
  ✅ should generate RPK docs
  ✅ should normalize version
  ✅ should return error when doc-tools not found
  ✅ should default to dev branch when no parameters provided
MCP Server Library - Repository Detection › Documentation Generation Tools › generateRpConnectDocs
  ✅ should generate Redpanda Connect connector docs
  ✅ should generate docs with flags
  ✅ should handle output without connector count
  ✅ should return error when doc-tools not found
  ✅ should handle command execution errors

✅ MCP Tools Integration Tests

MCP Tools Integration Tests › CLI Availability
  ✅ doc-tools CLI is available
  ✅ all required generate subcommands exist
MCP Tools Integration Tests › Tool Execution
  ✅ get_antora_structure returns valid structure
  ✅ get_redpanda_version returns version info
  ✅ get_console_version returns version info
MCP Tools Integration Tests › Generate Tools - Parameter Validation
  ✅ generate_property_docs defaults to dev branch when no parameters provided
  ✅ generate_metrics_docs defaults to dev branch when no parameters provided
  ✅ generate_rpk_docs defaults to dev branch when no parameters provided
  ✅ generate_crd_docs requires tag parameter
  ✅ generate_bundle_openapi requires tag parameter
MCP Tools Integration Tests › Review Tool
  ✅ review_generated_docs requires doc_type parameter
  ✅ review_generated_docs validates doc_type enum
MCP Tools Integration Tests › Error Handling
  ✅ unknown tool returns error
  ✅ invalid command in run_doc_tools_command is rejected
MCP Tools Integration Tests › CLI Output Parsing
  ✅ property-docs CLI output format is parseable
  ✅ metrics-docs CLI output format is parseable
  ✅ rpk-docs CLI output format is parseable
MCP Tools Integration Tests › File System Expectations
  ✅ doc-tools expects docs-extensions-and-macros structure
  ✅ property overrides file location is correct