# GraQle MCP Tool Inventory — v0.51.6

Total tools: **148**

Auto-generated by `scripts/generate_mcp_inventory.py`. 
Do not edit by hand. Re-run after adding or removing MCP tools.

Required args marked with `*`.

| Tool | Description | Args |
|---|---|---|
| `graq_apply` | Deterministic exact-string insertion engine . Use this INSTEAD of graq_edit when the target file is a CRITICAL hub (impact_radius > 20), large (>1500 lines), or has multiple loo... | `file_path*: string`, `insertions*: array`, `expected_input_sha256: string`, `expected_byte_delta_min: integer`, `expected_byte_delta_max: integer`, `expected_markers: object`, `dry_run: boolean` |
| `graq_audit` | Deep health audit of knowledge graph chunk coverage. Goes beyond validate (which checks descriptions) to audit the actual evidence chunks that reasoning agents depend on. Catche... | `fix: boolean`, `verbose: boolean` |
| `graq_auto` | Run the autonomous loop: plan, generate code, write files, run tests, diagnose failures, fix, and retry until GREEN or max retries. Use for tasks like 'write tests for module X'... | `task*: string`, `max_retries: integer`, `test_command: string`, `test_paths: array`, `dry_run: boolean` |
| `graq_bash` | Execute a governed shell command. Enforces allowlist, timeout, and working directory. Blocked in read-only mode. Blocked commands: rm -rf, git push --force, DROP TABLE, pip inst... | `command*: string`, `cwd: string`, `timeout: integer`, `dry_run: boolean` |
| `graq_chat_cancel` | Cancel an in-flight chat turn. Idempotent. | `turn_id*: string` |
| `graq_chat_poll` | Long-poll events from an in-flight chat turn. Returns events since since_seq up to an optional timeout. | `turn_id*: string`, `since_seq*: integer`, `timeout: number` |
| `graq_chat_resume` | Apply a permission decision (allow/deny/always) to a paused turn and transition it back to ACTIVE so the loop can continue. | `turn_id*: string`, `pending_id*: string`, `decision*: string` |
| `graq_chat_turn` | Start a chat turn. Drives one iteration of the chat agent loop and returns the first batch of events plus a cursor to poll. | `turn_id*: string`, `message*: string`, `scenario: string` |
| `graq_context` | Get smart, focused context for your current task. Returns relevant knowledge graph nodes, active branch info, and applicable lessons in ~300-500 tokens. Use at session start ins... | `task*: string`, `level: string`, `caller: string` |
| `graq_correct` | Record a routing correction — tells the classifier it picked the wrong tool. Persists the correction, updates the online learner, and returns status. | `question*: string`, `predicted_tool*: string`, `corrected_tool*: string`, `correction_source: string` |
| `graq_debug` | Diagnose a bug from a stack trace, error message, or symptom description. Uses the knowledge graph call graph to trace root causes through callers and dependencies. Returns root... | `error: string`, `symptom: string`, `file_path: string`, `include_fix: boolean` |
| `graq_drace` | DRACE governance scoring — query AI reasoning audit trails and development governance quality scores. DRACE = Dependency + Reasoning + Auditability + Constraint + Explainability... | `action: string`, `session_id: string`, `limit: integer` |
| `graq_edit` | Apply a governed atomic edit to a file using your project's knowledge graph. Provide a description to generate a diff, or provide a diff directly. Backup written to .graqle/edit... | `file_path*: string`, `description: string`, `diff: string`, `dry_run: boolean`, `max_rounds: integer`, `max_gap: integer`, `files: array` |
| `graq_gate` | Pre-compiled intelligence gate — instant context for any module (<100ms). Returns risk level, impact radius, consumers, dependencies, constraints, incidents, and public interfac... | `module*: string`, `action: string` |
| `graq_gate_install` | Install or upgrade the GraQle governance gate for Claude Code. Creates .claude/hooks/graqle-gate.py and merges PreToolUse hooks into .claude/settings.json. Runs a self-test afte... | `force: boolean`, `dry_run: boolean`, `fix_interpreter: boolean` |
| `graq_gate_status` | Check the health of the installed governance gate. Reports whether the Claude Code governance gate hook is installed, the interpreter is valid, and the self-test passes. Returns... | `self_test: boolean` |
| `graq_gcc_status` | Read GCC (Global Context Controller) status: active branch, latest commit, registry, and next steps. Equivalent to reading .gcc/registry.md + active branch commit.md. | `branch: string`, `level: string` |
| `graq_generate` | Generate a governed code patch as a unified diff using your project's knowledge graph. Graph context activates before generation. Preflight and safety checks run automatically. ... | `description*: string`, `file_path: string`, `max_rounds: integer`, `dry_run: boolean`, `stream: boolean`, `context: string`, `mode: string` |
| `graq_git_branch` | Create or switch git branches. Follows GCC naming conventions: feature-*, hotfix-*, experiment-*, spike-*. Blocked in read-only mode. | `name*: string`, `action: string`, `cwd: string` |
| `graq_git_commit` | Create a git commit with a governed message. Runs patent scan before commit — blocks if trade secrets (internal-pattern-A..internal-pattern-D) are detected in staged changes. Bl... | `message*: string`, `files: array`, `dry_run: boolean`, `cwd: string` |
| `graq_git_diff` | Show git diff. By default shows unstaged changes. Pass staged=True for staged diff, or base_ref to compare against a branch/commit. | `staged: boolean`, `base_ref: string`, `file_path: string`, `cwd: string` |
| `graq_git_log` | Show recent git commit history with author, date, and message. | `n: integer`, `file_path: string`, `cwd: string` |
| `graq_git_status` | Show git working tree status — changed, staged, and untracked files. | `cwd: string` |
| `graq_github_diff` | Fetch the unified diff for a GitHub pull request via gh CLI. Returns the full diff text for code review. | `pr_number*: string`, `repo: string` |
| `graq_github_pr` | Fetch GitHub pull request metadata via gh CLI. Returns title, state, author, body, branch names, additions/deletions/changed files, and review decision. | `pr_number*: string`, `repo: string` |
| `graq_glob` | Find files matching a glob pattern. Returns file paths sorted by modification time. Use for discovering files before reading or editing. | `pattern*: string`, `path: string`, `max_results: integer` |
| `graq_gov_gate` | Governance gate — run the 3-tier GovernanceMiddleware check on a diff or file. Returns tier (TS-BLOCK/T1/T2/T3), blocked (bool), gate_score (0.0-1.0), and reason. Exit code 1 eq... | `file_path*: string`, `diff: string`, `content: string`, `risk_level: string`, `impact_radius: integer`, `approved_by: string`, `justification: string`, `actor: string` |
| `graq_grep` | Search file contents by regex pattern. Returns matching lines with file path, line number, and context. Supports glob filter and case-insensitive mode. | `pattern*: string`, `path: string`, `glob: string`, `case_insensitive: boolean`, `context_lines: integer`, `max_results: integer` |
| `graq_impact` | Trace the downstream impact of a proposed change through the dependency graph. Shows which components are affected and their risk level. | `component*: string`, `change_type: string`, `code_only: boolean` |
| `graq_ingest` | Ingest a specification or document into the GSM (Global Strategy Management) system. Creates a summary in .gsm/summaries/, updates .gsm/index.md, and optionally generates a graq... | `content*: string`, `title*: string`, `doc_type: string`, `auto_plan: boolean` |
| `graq_inspect` | Inspect the project knowledge graph structure. Show nodes, edges, stats, or details for a specific node. | `node_id: string`, `stats: boolean`, `file_audit: boolean` |
| `graq_kg_diag` | T04 (v0.51.6): KG-write diagnostic snapshot. Reports recent write latencies, attempts, caller stacks, and current lock holders. Use this when WRITE_COLLISION surfaces to disambi... | _(no args)_ |
| `graq_learn` | Teach the knowledge graph. Three modes: 1. 'outcome' (default) — Record a dev outcome, adjust edge weights 2. 'entity' — Add a business entity (PRODUCT, CLIENT, TEAM, etc.) 3. '... | `mode: string`, `action: string`, `outcome: string`, `components: array`, `lesson: string`, `entity_id: string`, `entity_type: string`, `description: string`, `connects_to: array`, `domain: string`, `tags: array` |
| `graq_lessons` | Find lessons and past mistakes relevant to a specific operation. Returns matching lessons with severity levels and hit counts. | `operation*: string`, `severity_filter: string` |
| `graq_lifecycle` | Session lifecycle hooks for development workflows. Call at key moments: session_start (load context), investigation_start (before debugging), fix_complete (after a fix). Returns... | `event*: string`, `context: string`, `files: array` |
| `graq_phantom_audit` | Run one or more SCORCH audit dimensions on the current page. Analyzes the live page for behavioral UX issues, accessibility violations, mobile problems, security gaps, brand inc... | `session_id*: string`, `dimensions: array`, `teach_kg: boolean`, `compare_with: string` |
| `graq_phantom_browse` | Open a browser and navigate to a URL. Returns a screenshot and summarized DOM structure (buttons, links, forms, inputs, headings, landmarks). Supports authenticated sessions via... | `url*: string`, `viewport: string`, `auth_profile: string`, `session_id: string`, `wait_for: string`, `wait_after: integer`, `full_page_screenshot: boolean` |
| `graq_phantom_click` | Click an element on the current page. Supports targeting by visible text content, CSS selector, or x,y coordinates. Returns the page state after the click (new URL, screenshot, ... | `session_id*: string`, `target*: string`, `click_type: string`, `wait_after: integer`, `screenshot_after: boolean`, `expect_navigation: boolean` |
| `graq_phantom_discover` | Auto-discover all navigable pages from a starting URL. Crawls the sidebar, navigation menus, and in-page links to build a complete route map. Returns structured list of all disc... | `url*: string`, `auth_profile: string`, `max_depth: integer`, `max_pages: integer`, `exclude_patterns: array` |
| `graq_phantom_flow` | Execute a multi-step user journey. Define a sequence of actions (navigate, click, type, wait, screenshot, assert, scroll, audit) and Phantom executes them in order, capturing sc... | `name*: string`, `auth_profile: string`, `viewport: string`, `steps*: array`, `stop_on_failure: boolean` |
| `graq_phantom_screenshot` | Capture the current page state as a screenshot. Optionally analyze it with Claude Vision (Bedrock) to identify UX friction, visual bugs, layout issues, or answer questions about... | `session_id*: string`, `analyze: boolean`, `analysis_prompt: string`, `analysis_model: string`, `region: string`, `full_page: boolean`, `mask: array` |
| `graq_phantom_session` | Manage Phantom browser sessions and authentication profiles. Create sessions, save/load auth states, list active sessions, and clean up resources. | `action*: string`, `session_id: string`, `profile_name: string`, `login_url: string`, `credentials: object`, `viewport: string` |
| `graq_phantom_type` | Type text into a form field or input element. Can target by CSS selector, label text, placeholder text, or input name. Supports clearing existing content, pressing Enter to subm... | `session_id*: string`, `target*: string`, `text*: string`, `clear_first: boolean`, `submit: boolean`, `type_delay: integer`, `screenshot_after: boolean` |
| `graq_plan` | Decompose a high-level goal into a governance-gated DAG execution plan. Uses the knowledge graph (impact_radius, CALLS/IMPORTS edges, causal tiers) to order steps, assign risk l... | `goal*: string`, `scope: string`, `max_steps: integer`, `include_tests: boolean`, `require_approval_threshold: string`, `dry_run: boolean` |
| `graq_predict` | Run governed reasoning over the knowledge graph and — if confidence is sufficient — write the compound prediction as a new subgraph into the graph permanently. Future similar qu... | `query*: string`, `max_rounds: integer`, `fold_back: boolean`, `confidence_threshold: number`, `similarity_threshold: number` |
| `graq_preflight` | Run a governance preflight check before making code changes. Returns relevant lessons, past mistakes, applicable architectural decisions, and safety boundary warnings. Call this... | `action*: string`, `files: array`, `caller: string` |
| `graq_profile` | Profile the performance of a graq_reason invocation: per-step latency, token cost, and confidence at each reasoning phase. Identifies bottleneck steps, flags slow/expensive node... | `query*: string`, `max_rounds: integer`, `session_label: string`, `write_kg_node: boolean`, `include_step_breakdown: boolean` |
| `graq_read` | Read a file's contents with optional line range. Returns file text with line numbers. Supports offset/limit for large files. | `file_path*: string`, `offset: integer`, `limit: integer` |
| `graq_reason` | Run graph-of-agents reasoning over the project knowledge graph. Each relevant node becomes an agent that reasons about your question, exchanges messages with neighbors, and coll... | `question*: string`, `max_rounds: integer`, `caller: string` |
| `graq_reason_batch` | Run multiple reasoning queries in parallel over the knowledge graph. Each query gets its own graph-of-agents reasoning session, running concurrently with semaphore-controlled pa... | `questions*: array`, `mode: string`, `fold_back: boolean`, `confidence_threshold: number`, `max_rounds: integer`, `max_concurrent: integer` |
| `graq_reload` | Force-reload the knowledge graph from disk. Use after external changes to graqle.json (e.g., after graq learn, graq scan, or manual edits). | _(no args)_ |
| `graq_review` | Perform a structured code review on a file or diff. Checks correctness, security, style, test coverage, and complexity using the knowledge graph for impact context. Returns stru... | `file_path: string`, `diff: string`, `focus: string`, `context_depth: integer`, `spec: string` |
| `graq_route` | Smart query router — classifies your question and recommends whether to use GraQle tools or external tools (CloudWatch, grep, git). Call this BEFORE investigating to get the mos... | `question*: string` |
| `graq_runtime` | Query live runtime observability data from your cloud environment. Auto-detects AWS CloudWatch, Azure Monitor, GCP Cloud Logging, or local Docker/file logs. Returns classified r... | `query: string`, `source: string`, `service: string`, `hours: number`, `severity_filter: string`, `ingest: boolean` |
| `graq_safety_check` | Combined safety check: chains impact → preflight → reasoning into a single call. Gives a complete safety picture before making a change. Reasoning is only triggered if risk is m... | `component*: string`, `change_type: string`, `skip_reasoning: boolean` |
| `graq_scaffold` | Scaffold a new module, class, API endpoint, or test suite from a specification. Uses existing patterns in the knowledge graph to match project conventions. Returns a set of file... | `spec*: string`, `scaffold_type: string`, `output_dir: string`, `dry_run: boolean`, `with_tests: boolean` |
| `graq_scorch_a11y` | WCAG 2.1 AA/AAA accessibility audit: color contrast scanner, missing aria-labels, focus order validation, heading hierarchy, landmark structure, form labels, image alt text. Req... | `url*: string`, `pages: array` |
| `graq_scorch_audit` | Run a full SCORCH v3 audit: screenshots + CSS metrics + 12 behavioral UX tests + Claude Vision journey psychology. Returns pass/fail, issue list, journey score. Requires: pip in... | `url: string`, `pages: array`, `config_path: string`, `skip_behavioral: boolean`, `skip_vision: boolean`, `enrich_kg: boolean` |
| `graq_scorch_auth_flow` | Authenticated user journey audit: tests login/signup/onboarding flows, verifies redirect behavior, session indicators, post-auth navigation. Runs both unauthenticated and authen... | `url*: string`, `pages: array`, `auth_state: string` |
| `graq_scorch_behavioral` | Run ONLY the 12 behavioral UX friction tests (Phase 2.5). Fast, no AI cost. Tests: dead clicks, silent submissions, unexplained jargon, ghost elements, missing CTAs, copy-paste ... | `url*: string`, `pages: array` |
| `graq_scorch_brand` | Brand consistency audit: color palette compliance against brand rules, typography adherence, font size compliance, logo presence, spacing consistency, button/link/heading style ... | `url*: string`, `pages: array` |
| `graq_scorch_conversion` | Conversion funnel analysis: CTA inventory and placement (above/below fold), form quality analysis, trust signal detection (testimonials, badges), pricing clarity, micro-copy qua... | `url*: string`, `pages: array` |
| `graq_scorch_diff` | Before/after SCORCH comparison: compares current report against a previous one. Shows resolved issues, new issues, persistent issues, journey score delta, severity count changes... | `previous_report: string`, `current_report: string` |
| `graq_scorch_i18n` | Internationalization audit: html lang attribute, hardcoded strings, RTL support, date/currency formatting patterns, mixed language content detection, Unicode support checks. Req... | `url*: string`, `pages: array` |
| `graq_scorch_mobile` | Mobile-specific audit: touch target sizes (44px minimum), viewport meta validation, text readability at mobile sizes, horizontal scroll detection, input type correctness, pinch-... | `url*: string`, `pages: array` |
| `graq_scorch_perf` | Core Web Vitals audit: LCP, FID, CLS measurement per page, resource count/size analysis, render-blocking resource detection, DOM size, image optimization checks. Requires: pip i... | `url*: string`, `pages: array` |
| `graq_scorch_report` | Read and summarize a SCORCH audit report from disk. Returns pass/fail status, issue counts, journey score, and top recommendations. | `report_path: string` |
| `graq_scorch_security` | Frontend security audit: CSP headers, exposed API keys (OpenAI/AWS/GitHub/Stripe), inline scripts without nonce, mixed content, insecure form actions, sensitive data in localSto... | `url*: string`, `pages: array` |
| `graq_scorch_seo` | SEO audit: title/meta description, canonical URLs, Open Graph + Twitter Card tags, structured data (JSON-LD), heading hierarchy, internal/external link analysis, image alt cover... | `url*: string`, `pages: array` |
| `graq_test` | Run pytest on a target (file, directory, or test ID) and parse the results into structured CodeMetric output. Captures: pass/fail/skip counts, coverage %, failing test names, an... | `target: string`, `coverage: boolean`, `fail_fast: boolean`, `cwd: string`, `record_metrics: boolean` |
| `graq_todo` | Manage a governed todo list for the current session. Replaces Claude Code's native TodoWrite with audit trail. Pass the full updated todo list each time (replacement semantics). | `todos*: array` |
| `graq_vendor` | Download vendor JavaScript/CSS files from npm/unpkg/cdnjs by package name and version. Saves to a local vendor/ directory. Useful for offline-first Studio builds. | `package*: string`, `version: string`, `files: array`, `output_dir: string`, `cdn: string` |
| `graq_web_search` | Search the internet for solutions when the knowledge graph is stuck. REQUIRES explicit user permission before every search. Shows the user exactly what will be searched. Results... | `query*: string`, `mode: string`, `reason*: string`, `max_results: integer`, `learn: boolean` |
| `graq_workflow` | Orchestrate multi-step coding workflows that chain multiple tools together. Built-in workflows: 'bug_fix' (grep→read→generate→write→bash→git), 'scaffold_and_test' (scaffold→gene... | `workflow*: string`, `goal*: string`, `context: object`, `dry_run: boolean`, `max_steps: integer` |
| `graq_write` | Atomically write or overwrite a file. Uses NamedTemporaryFile→fsync→os.replace. Creates parent directories if needed. dry_run=True (default) previews without writing. Patent sca... | `file_path*: string`, `content*: string`, `dry_run: boolean` |
| `kogni_apply` | Deterministic exact-string insertion engine . Use this INSTEAD of graq_edit when the target file is a CRITICAL hub (impact_radius > 20), large (>1500 lines), or has multiple loo... | `file_path*: string`, `insertions*: array`, `expected_input_sha256: string`, `expected_byte_delta_min: integer`, `expected_byte_delta_max: integer`, `expected_markers: object`, `dry_run: boolean` |
| `kogni_auto` | Run the autonomous loop: plan, generate code, write files, run tests, diagnose failures, fix, and retry until GREEN or max retries. Use for tasks like 'write tests for module X'... | `task*: string`, `max_retries: integer`, `test_command: string`, `test_paths: array`, `dry_run: boolean` |
| `kogni_bash` | Execute a governed shell command. Enforces allowlist, timeout, and working directory. Blocked in read-only mode. Blocked commands: rm -rf, git push --force, DROP TABLE, pip inst... | `command*: string`, `cwd: string`, `timeout: integer`, `dry_run: boolean` |
| `kogni_chat_cancel` | Cancel an in-flight chat turn. Idempotent. | `turn_id*: string` |
| `kogni_chat_poll` | Long-poll events from an in-flight chat turn. Returns events since since_seq up to an optional timeout. | `turn_id*: string`, `since_seq*: integer`, `timeout: number` |
| `kogni_chat_resume` | Apply a permission decision (allow/deny/always) to a paused turn and transition it back to ACTIVE so the loop can continue. | `turn_id*: string`, `pending_id*: string`, `decision*: string` |
| `kogni_chat_turn` | Start a chat turn. Drives one iteration of the chat agent loop and returns the first batch of events plus a cursor to poll. | `turn_id*: string`, `message*: string`, `scenario: string` |
| `kogni_context` | Get smart, focused context for your current task. Returns relevant knowledge graph nodes, active branch info, and applicable lessons in ~300-500 tokens. Use at session start ins... | `task*: string`, `level: string`, `caller: string` |
| `kogni_correct` | Record a routing correction — tells the classifier it picked the wrong tool. Persists the correction, updates the online learner, and returns status. | `question*: string`, `predicted_tool*: string`, `corrected_tool*: string`, `correction_source: string` |
| `kogni_debug` | Diagnose a bug from a stack trace, error message, or symptom description. Uses the knowledge graph call graph to trace root causes through callers and dependencies. Returns root... | `error: string`, `symptom: string`, `file_path: string`, `include_fix: boolean` |
| `kogni_drace` | DRACE governance scoring — query AI reasoning audit trails and development governance quality scores. DRACE = Dependency + Reasoning + Auditability + Constraint + Explainability... | `action: string`, `session_id: string`, `limit: integer` |
| `kogni_edit` | Apply a governed atomic edit to a file using your project's knowledge graph. Provide a description to generate a diff, or provide a diff directly. Backup written to .graqle/edit... | `file_path*: string`, `description: string`, `diff: string`, `dry_run: boolean`, `max_rounds: integer`, `max_gap: integer`, `files: array` |
| `kogni_gate` | Pre-compiled intelligence gate — instant context for any module (<100ms). Returns risk level, impact radius, consumers, dependencies, constraints, incidents, and public interfac... | `module*: string`, `action: string` |
| `kogni_gate_install` | Install or upgrade the GraQle governance gate for Claude Code. Creates .claude/hooks/graqle-gate.py and merges PreToolUse hooks into .claude/settings.json. Runs a self-test afte... | `force: boolean`, `dry_run: boolean`, `fix_interpreter: boolean` |
| `kogni_gate_status` | Check the health of the installed governance gate. Reports whether the Claude Code governance gate hook is installed, the interpreter is valid, and the self-test passes. Returns... | `self_test: boolean` |
| `kogni_gcc_status` | Read GCC (Global Context Controller) status: active branch, latest commit, registry, and next steps. Equivalent to reading .gcc/registry.md + active branch commit.md. | `branch: string`, `level: string` |
| `kogni_generate` | Generate a governed code patch as a unified diff using your project's knowledge graph. Graph context activates before generation. Preflight and safety checks run automatically. ... | `description*: string`, `file_path: string`, `max_rounds: integer`, `dry_run: boolean`, `stream: boolean`, `context: string`, `mode: string` |
| `kogni_git_branch` | Create or switch git branches. Follows GCC naming conventions: feature-*, hotfix-*, experiment-*, spike-*. Blocked in read-only mode. | `name*: string`, `action: string`, `cwd: string` |
| `kogni_git_commit` | Create a git commit with a governed message. Runs patent scan before commit — blocks if trade secrets (internal-pattern-A..internal-pattern-D) are detected in staged changes. Bl... | `message*: string`, `files: array`, `dry_run: boolean`, `cwd: string` |
| `kogni_git_diff` | Show git diff. By default shows unstaged changes. Pass staged=True for staged diff, or base_ref to compare against a branch/commit. | `staged: boolean`, `base_ref: string`, `file_path: string`, `cwd: string` |
| `kogni_git_log` | Show recent git commit history with author, date, and message. | `n: integer`, `file_path: string`, `cwd: string` |
| `kogni_git_status` | Show git working tree status — changed, staged, and untracked files. | `cwd: string` |
| `kogni_github_diff` | Fetch the unified diff for a GitHub pull request via gh CLI. Returns the full diff text for code review. | `pr_number*: string`, `repo: string` |
| `kogni_github_pr` | Fetch GitHub pull request metadata via gh CLI. Returns title, state, author, body, branch names, additions/deletions/changed files, and review decision. | `pr_number*: string`, `repo: string` |
| `kogni_glob` | Find files matching a glob pattern. Returns file paths sorted by modification time. Use for discovering files before reading or editing. | `pattern*: string`, `path: string`, `max_results: integer` |
| `kogni_gov_gate` | Governance gate — run the 3-tier GovernanceMiddleware check on a diff or file. Returns tier (TS-BLOCK/T1/T2/T3), blocked (bool), gate_score (0.0-1.0), and reason. Exit code 1 eq... | `file_path*: string`, `diff: string`, `content: string`, `risk_level: string`, `impact_radius: integer`, `approved_by: string`, `justification: string`, `actor: string` |
| `kogni_grep` | Search file contents by regex pattern. Returns matching lines with file path, line number, and context. Supports glob filter and case-insensitive mode. | `pattern*: string`, `path: string`, `glob: string`, `case_insensitive: boolean`, `context_lines: integer`, `max_results: integer` |
| `kogni_impact` | Trace the downstream impact of a proposed change through the dependency graph. Shows which components are affected and their risk level. | `component*: string`, `change_type: string`, `code_only: boolean` |
| `kogni_ingest` | Ingest a specification or document into the GSM (Global Strategy Management) system. Creates a summary in .gsm/summaries/, updates .gsm/index.md, and optionally generates a graq... | `content*: string`, `title*: string`, `doc_type: string`, `auto_plan: boolean` |
| `kogni_inspect` | Inspect the project knowledge graph structure. Show nodes, edges, stats, or details for a specific node. | `node_id: string`, `stats: boolean`, `file_audit: boolean` |
| `kogni_kg_diag` | T04 (v0.51.6): KG-write diagnostic snapshot. Reports recent write latencies, attempts, caller stacks, and current lock holders. Use this when WRITE_COLLISION surfaces to disambi... | _(no args)_ |
| `kogni_learn` | Teach the knowledge graph. Three modes: 1. 'outcome' (default) — Record a dev outcome, adjust edge weights 2. 'entity' — Add a business entity (PRODUCT, CLIENT, TEAM, etc.) 3. '... | `mode: string`, `action: string`, `outcome: string`, `components: array`, `lesson: string`, `entity_id: string`, `entity_type: string`, `description: string`, `connects_to: array`, `domain: string`, `tags: array` |
| `kogni_lessons` | Find lessons and past mistakes relevant to a specific operation. Returns matching lessons with severity levels and hit counts. | `operation*: string`, `severity_filter: string` |
| `kogni_lifecycle` | Session lifecycle hooks for development workflows. Call at key moments: session_start (load context), investigation_start (before debugging), fix_complete (after a fix). Returns... | `event*: string`, `context: string`, `files: array` |
| `kogni_phantom_audit` | Run one or more SCORCH audit dimensions on the current page. Analyzes the live page for behavioral UX issues, accessibility violations, mobile problems, security gaps, brand inc... | `session_id*: string`, `dimensions: array`, `teach_kg: boolean`, `compare_with: string` |
| `kogni_phantom_browse` | Open a browser and navigate to a URL. Returns a screenshot and summarized DOM structure (buttons, links, forms, inputs, headings, landmarks). Supports authenticated sessions via... | `url*: string`, `viewport: string`, `auth_profile: string`, `session_id: string`, `wait_for: string`, `wait_after: integer`, `full_page_screenshot: boolean` |
| `kogni_phantom_click` | Click an element on the current page. Supports targeting by visible text content, CSS selector, or x,y coordinates. Returns the page state after the click (new URL, screenshot, ... | `session_id*: string`, `target*: string`, `click_type: string`, `wait_after: integer`, `screenshot_after: boolean`, `expect_navigation: boolean` |
| `kogni_phantom_discover` | Auto-discover all navigable pages from a starting URL. Crawls the sidebar, navigation menus, and in-page links to build a complete route map. Returns structured list of all disc... | `url*: string`, `auth_profile: string`, `max_depth: integer`, `max_pages: integer`, `exclude_patterns: array` |
| `kogni_phantom_flow` | Execute a multi-step user journey. Define a sequence of actions (navigate, click, type, wait, screenshot, assert, scroll, audit) and Phantom executes them in order, capturing sc... | `name*: string`, `auth_profile: string`, `viewport: string`, `steps*: array`, `stop_on_failure: boolean` |
| `kogni_phantom_screenshot` | Capture the current page state as a screenshot. Optionally analyze it with Claude Vision (Bedrock) to identify UX friction, visual bugs, layout issues, or answer questions about... | `session_id*: string`, `analyze: boolean`, `analysis_prompt: string`, `analysis_model: string`, `region: string`, `full_page: boolean`, `mask: array` |
| `kogni_phantom_session` | Manage Phantom browser sessions and authentication profiles. Create sessions, save/load auth states, list active sessions, and clean up resources. | `action*: string`, `session_id: string`, `profile_name: string`, `login_url: string`, `credentials: object`, `viewport: string` |
| `kogni_phantom_type` | Type text into a form field or input element. Can target by CSS selector, label text, placeholder text, or input name. Supports clearing existing content, pressing Enter to subm... | `session_id*: string`, `target*: string`, `text*: string`, `clear_first: boolean`, `submit: boolean`, `type_delay: integer`, `screenshot_after: boolean` |
| `kogni_plan` | Decompose a high-level goal into a governance-gated DAG execution plan. Uses the knowledge graph (impact_radius, CALLS/IMPORTS edges, causal tiers) to order steps, assign risk l... | `goal*: string`, `scope: string`, `max_steps: integer`, `include_tests: boolean`, `require_approval_threshold: string`, `dry_run: boolean` |
| `kogni_predict` | Run governed reasoning over the knowledge graph and — if confidence is sufficient — write the compound prediction as a new subgraph into the graph permanently. Future similar qu... | `query*: string`, `max_rounds: integer`, `fold_back: boolean`, `confidence_threshold: number`, `similarity_threshold: number` |
| `kogni_preflight` | Run a governance preflight check before making code changes. Returns relevant lessons, past mistakes, applicable architectural decisions, and safety boundary warnings. Call this... | `action*: string`, `files: array`, `caller: string` |
| `kogni_profile` | Profile the performance of a graq_reason invocation: per-step latency, token cost, and confidence at each reasoning phase. Identifies bottleneck steps, flags slow/expensive node... | `query*: string`, `max_rounds: integer`, `session_label: string`, `write_kg_node: boolean`, `include_step_breakdown: boolean` |
| `kogni_read` | Read a file's contents with optional line range. Returns file text with line numbers. Supports offset/limit for large files. | `file_path*: string`, `offset: integer`, `limit: integer` |
| `kogni_reason` | Run graph-of-agents reasoning over the project knowledge graph. Each relevant node becomes an agent that reasons about your question, exchanges messages with neighbors, and coll... | `question*: string`, `max_rounds: integer`, `caller: string` |
| `kogni_reason_batch` | Run multiple reasoning queries in parallel over the knowledge graph. Each query gets its own graph-of-agents reasoning session, running concurrently with semaphore-controlled pa... | `questions*: array`, `mode: string`, `fold_back: boolean`, `confidence_threshold: number`, `max_rounds: integer`, `max_concurrent: integer` |
| `kogni_review` | Perform a structured code review on a file or diff. Checks correctness, security, style, test coverage, and complexity using the knowledge graph for impact context. Returns stru... | `file_path: string`, `diff: string`, `focus: string`, `context_depth: integer`, `spec: string` |
| `kogni_route` | Smart query router — classifies your question and recommends whether to use GraQle tools or external tools (CloudWatch, grep, git). Call this BEFORE investigating to get the mos... | `question*: string` |
| `kogni_runtime` | Query live runtime observability data from your cloud environment. Auto-detects AWS CloudWatch, Azure Monitor, GCP Cloud Logging, or local Docker/file logs. Returns classified r... | `query: string`, `source: string`, `service: string`, `hours: number`, `severity_filter: string`, `ingest: boolean` |
| `kogni_safety_check` | Combined safety check: chains impact → preflight → reasoning into a single call. Gives a complete safety picture before making a change. Reasoning is only triggered if risk is m... | `component*: string`, `change_type: string`, `skip_reasoning: boolean` |
| `kogni_scaffold` | Scaffold a new module, class, API endpoint, or test suite from a specification. Uses existing patterns in the knowledge graph to match project conventions. Returns a set of file... | `spec*: string`, `scaffold_type: string`, `output_dir: string`, `dry_run: boolean`, `with_tests: boolean` |
| `kogni_scorch_a11y` | WCAG 2.1 AA/AAA accessibility audit: color contrast scanner, missing aria-labels, focus order validation, heading hierarchy, landmark structure, form labels, image alt text. Req... | `url*: string`, `pages: array` |
| `kogni_scorch_audit` | Run a full SCORCH v3 audit: screenshots + CSS metrics + 12 behavioral UX tests + Claude Vision journey psychology. Returns pass/fail, issue list, journey score. Requires: pip in... | `url: string`, `pages: array`, `config_path: string`, `skip_behavioral: boolean`, `skip_vision: boolean`, `enrich_kg: boolean` |
| `kogni_scorch_auth_flow` | Authenticated user journey audit: tests login/signup/onboarding flows, verifies redirect behavior, session indicators, post-auth navigation. Runs both unauthenticated and authen... | `url*: string`, `pages: array`, `auth_state: string` |
| `kogni_scorch_behavioral` | Run ONLY the 12 behavioral UX friction tests (Phase 2.5). Fast, no AI cost. Tests: dead clicks, silent submissions, unexplained jargon, ghost elements, missing CTAs, copy-paste ... | `url*: string`, `pages: array` |
| `kogni_scorch_brand` | Brand consistency audit: color palette compliance against brand rules, typography adherence, font size compliance, logo presence, spacing consistency, button/link/heading style ... | `url*: string`, `pages: array` |
| `kogni_scorch_conversion` | Conversion funnel analysis: CTA inventory and placement (above/below fold), form quality analysis, trust signal detection (testimonials, badges), pricing clarity, micro-copy qua... | `url*: string`, `pages: array` |
| `kogni_scorch_diff` | Before/after SCORCH comparison: compares current report against a previous one. Shows resolved issues, new issues, persistent issues, journey score delta, severity count changes... | `previous_report: string`, `current_report: string` |
| `kogni_scorch_i18n` | Internationalization audit: html lang attribute, hardcoded strings, RTL support, date/currency formatting patterns, mixed language content detection, Unicode support checks. Req... | `url*: string`, `pages: array` |
| `kogni_scorch_mobile` | Mobile-specific audit: touch target sizes (44px minimum), viewport meta validation, text readability at mobile sizes, horizontal scroll detection, input type correctness, pinch-... | `url*: string`, `pages: array` |
| `kogni_scorch_perf` | Core Web Vitals audit: LCP, FID, CLS measurement per page, resource count/size analysis, render-blocking resource detection, DOM size, image optimization checks. Requires: pip i... | `url*: string`, `pages: array` |
| `kogni_scorch_report` | Read and summarize a SCORCH audit report from disk. Returns pass/fail status, issue counts, journey score, and top recommendations. | `report_path: string` |
| `kogni_scorch_security` | Frontend security audit: CSP headers, exposed API keys (OpenAI/AWS/GitHub/Stripe), inline scripts without nonce, mixed content, insecure form actions, sensitive data in localSto... | `url*: string`, `pages: array` |
| `kogni_scorch_seo` | SEO audit: title/meta description, canonical URLs, Open Graph + Twitter Card tags, structured data (JSON-LD), heading hierarchy, internal/external link analysis, image alt cover... | `url*: string`, `pages: array` |
| `kogni_test` | Run pytest on a target (file, directory, or test ID) and parse the results into structured CodeMetric output. Captures: pass/fail/skip counts, coverage %, failing test names, an... | `target: string`, `coverage: boolean`, `fail_fast: boolean`, `cwd: string`, `record_metrics: boolean` |
| `kogni_todo` | Manage a governed todo list for the current session. Replaces Claude Code's native TodoWrite with audit trail. Pass the full updated todo list each time (replacement semantics). | `todos*: array` |
| `kogni_vendor` | Download vendor JavaScript/CSS files from npm/unpkg/cdnjs by package name and version. Saves to a local vendor/ directory. Useful for offline-first Studio builds. | `package*: string`, `version: string`, `files: array`, `output_dir: string`, `cdn: string` |
| `kogni_web_search` | Search the internet for solutions when the knowledge graph is stuck. REQUIRES explicit user permission before every search. Shows the user exactly what will be searched. Results... | `query*: string`, `mode: string`, `reason*: string`, `max_results: integer`, `learn: boolean` |
| `kogni_workflow` | Orchestrate multi-step coding workflows that chain multiple tools together. Built-in workflows: 'bug_fix' (grep→read→generate→write→bash→git), 'scaffold_and_test' (scaffold→gene... | `workflow*: string`, `goal*: string`, `context: object`, `dry_run: boolean`, `max_steps: integer` |
| `kogni_write` | Atomically write or overwrite a file. Uses NamedTemporaryFile→fsync→os.replace. Creates parent directories if needed. dry_run=True (default) previews without writing. Patent sca... | `file_path*: string`, `content*: string`, `dry_run: boolean` |
