MCP Tool Preferences
Establishes explicit preferences for MCP tools over CLI equivalents. Ensures consistent, reliable tool usage when multiple paths exist.
MCP Tool Preferences
When MCP tools are available, ALWAYS prefer them over CLI equivalents unless the user explicitly requests CLI usage.
Mandatory Requirements
| Requirement | Rule | Rationale |
|---|---|---|
| MCP First | MUST prefer MCP tools over CLI equivalents when available | Consistent behavior |
| Pre-Flight Checks | MUST complete pre-flight requirements before operations | Proper initialization |
| Error Reporting | MUST report MCP tool failures clearly before trying CLI | User awareness |
| Auth Verification | MUST verify authentication before resource operations | Prevent auth failures |
| Structured Output | MUST use MCP for structured data retrieval | Avoid parsing text |
Prohibited Patterns
| Pattern | Prohibition | Alternative |
|---|---|---|
| CLI Over MCP | NEVER use CLI when equivalent MCP tool exists | Use MCP tool |
| Silent CLI Fallback | NEVER silently switch from MCP to CLI on failure | Report error, ask user |
| Assumed Executables | NEVER assume psql, gh, az are installed | Use MCP equivalents |
| Python Path Assumption | NEVER assume python command works | Use get_python_executable_details |
| Skip Pre-Flight | NEVER skip pre-flight checks for database/cloud ops | Complete all required steps |
Why MCP Tools First
- Authentication handled: MCP connections manage credentials; CLI may require separate auth
- Structured output: MCP returns typed data; CLI requires parsing text
- User may not have CLI installed:
psql,gh,az,kubectlare not guaranteed - Consistency: Same tool = same behavior across sessions
Tool Preference Matrix
| Task | PREFER (MCP) | AVOID (CLI) |
|---|---|---|
| PostgreSQL queries | pgsql_connect, pgsql_query, pgsql_modify | psql |
| PostgreSQL schema | pgsql_db_context, pgsql_visualize_schema | pg_dump, \d commands |
| GitHub PR details | github-pull-request_activePullRequest | gh pr view |
| GitHub issues | github-pull-request_issue_fetch | gh issue view |
| GitHub search | github-pull-request_formSearchQuery + doSearch | gh search |
| Azure resources | azure_resources-query_azure_resource_graph | az resource list |
| Azure auth | azure_auth-get_auth_context | az account show |
| Python environment | configure_python_environment | Assume python works |
| Python packages | install_python_packages | pip install directly |
| Git changes | get_changed_files | git diff (use for complex diffs) |
| File search | file_search, grep_search, semantic_search | find, grep |
| Code navigation | list_code_usages | grep for symbol names |
Pre-Flight Requirements
Before PostgreSQL Operations
- MUST call
pgsql_list_serversto discover available connections - MUST call
pgsql_connectto establish connection - MUST call
pgsql_db_contextbefore modifications to understand schema
Before Python Operations
- MUST call
configure_python_environmentfirst - MUST use
get_python_executable_detailsto get correct invocation - Do NOT assume
pythonorpython3is the correct command
Before GitHub Operations
- For current PR: MUST call
github-pull-request_activePullRequestfirst - For searches: MUST call
github-pull-request_formSearchQuerybeforedoSearch - For issue details: Use
github-pull-request_issue_fetchwith issue number
Before Azure Operations
- MUST call
azure_development-recommend_custom_modesfor Azure-related requests - For resource queries: Use
azure_resources-query_azure_resource_graph - Check auth context with
azure_auth-get_auth_contextif access issues arise
When CLI Is Appropriate
Use terminal commands when:
- User explicitly requests CLI (e.g., "run
gh pr create") - No MCP equivalent exists for the operation
- MCP tool fails and CLI is a documented fallback
- Operation requires interactive input that MCP cannot handle
- Running build/test commands (
npm test,make build, etc.)
Prohibited Patterns
Do NOT:
- Run
psqlwhenpgsql_*tools are available - Run
gh pr viewwhengithub-pull-request_activePullRequestexists - Run
azcommands for resource queries when ARG tools are available - Assume Python executable path without checking environment tools
- Use
grepfor code symbol search whenlist_code_usagesfits better
Error Recovery
If an MCP tool fails:
- Report the error clearly to the user
- Check if authentication/connection is the issue
- Offer CLI as explicit fallback: "The MCP tool failed. Would you like me to try using the CLI instead?"
- Do NOT silently switch to CLI
Tool Discovery
If unsure whether an MCP tool exists:
- Check the tools available in current context
- Prefer tools with structured parameters over freeform CLI
- When in doubt, ask: "I can do this via [MCP tool] or [CLI]. Which do you prefer?"
Related Assets
Example: Terraform Plan Review
Review Terraform plan output to identify risks, validate best practices, and provide actionable feedback before apply.
Owner: epic-platform-sre
Ansible Playbook Validator
Goal-oriented Ansible specialist that validates playbooks for syntax, idempotency, best practices, and compliance. Autonomously checks collections, roles, and AWX inventory sources. Use for comprehensive playbook validation before deployment.
Owner: platform-automation
Wall-E Workflow Designer (Optum)
Assist with designing, reviewing, and optimizing multi-agent Wall-E workflows and MCP integrations following Optum enterprise patterns.
Owner: epic-platform-sre
Kratos Memory System Usage Guide
Guidelines for using Kratos MCP memory system for project-isolated persistent memory storage, retrieval, and full-text search in AI coding workflows.
Owner: epic-platform-sre
MCP Server Development Standards (Optum)
Standards, patterns, and guardrails for building Model Context Protocol (MCP) servers compatible with Wall-E, VS Code Copilot, and enterprise systems.
Owner: epic-platform-sre
Project Constraints Awareness
Instructs agents to proactively understand project constraints from pre-commit configs, CI/CD workflows, and linting rules before creating or modifying files
Owner: thudak

