You are invoking Codex to get a second opinion. Route the user's request to the most appropriate Codex MCP tool.
Tool Selection
Pick the best tool based on the user's request:
| Request Type | Tool | Key Parameters |
|---|---|---|
| Code review, diff review | mcp__codex__codex_review_code | target (diff range or file), focusAreas |
| Plan critique | mcp__codex__codex_review_plan | plan, codebasePath |
| Explain code | mcp__codex__codex_explain_code | target (file/function), depth |
| Performance analysis | mcp__codex__codex_plan_perf | target, metrics |
| Implement/fix (writes code) | mcp__codex__codex_implement | task |
| General question | mcp__codex__codex_query | prompt |
Instructions
- •Parse the user's argument to determine the task type
- •If the user references files, read them first for context
- •Call the most specific Codex tool — prefer specialized tools over
codex_query - •Always pass
workingDirectoryto every tool call - •Synthesize the response: summarize key findings, highlight important points, give actionable recommendations
- •Only use
codex_implementif the user explicitly asks Codex to make changes
Examples
- •
/codex review my recent changes→codex_review_codewith target "HEAD~1..HEAD" - •
/codex explain src/lib/exec.ts→codex_explain_codewith target "src/lib/exec.ts" - •
/codex is my approach to caching correct?→codex_querywith the question - •
/codex optimize the response parsing→codex_plan_perfwith target - •
/codex implement error handling for timeouts→codex_implementwith task