Grok Plugin Codex
Grok Plugin Codex
grok-plugin-codex は、バンドルされた Node/TypeScript MCP サーバーを通じて、ローカルにインストールされた Grok CLI を Codex に公開します。Codex は引き続きスコープ、ワークスペースの状態、検証、git、最終判断を担当し、Grok は制限付きの第二の表面として機能します。
現在のリリースはバージョン 0.3.0 です。Grok の停止理由語彙(end_turn と EndTurn は同一の事実)を正規化し、タイムアウトとクォータ枯渇を正しく分類し、ディスパッチツールをデフォルトでバックグラウンド(種類ごとに時間予算付き)に設定し、不完全な結果ごとにリカバリハンドルを返し、ツール呼び出しを一度も行わずに到達した判定を完了したレビューとして報告することを拒否し、さらに grok_finalize(既に存在する回答を回復するための1ターン、ツール不要の方法)を追加します。完全な契約変更については CHANGELOG.md を参照してください。バージョン 0.2 では、プライベートな中央ワーカーアーキテクチャと型付き MCP エンベロープが導入されました。
リポジトリ: https://github.com/handong66/grok-plugin-codex 解説記事: https://han-dong.link/en/work/grok-plugin-codex
要件
Node.js
>=22npm
macOS または Linux
Codex ローカルプラグインマーケットプレイスのサポート
Grok CLI がインストールされ、認証済みであること
3つのランタイムレイヤーを個別に確認してください:
grok --version # CLI can be discovered
grok --help # installed flags/capabilities
grok models # authentication and model listingリストされたモデルが実際の呼び出しを完了したとは限りません。grok_check はその区別を保持します。
Related MCP server: Grok Build Bridge
インストール
npm install
npm run check
codex plugin marketplace add .
codex plugin add grok-plugin-codex --marketplace grok-plugin-codexインストールまたはアップグレード後は、新しい Codex タスクを開始してください。既存のタスクは、開始時に使用していた MCP サーバーとスキルスナップショットを保持します。新しい Codex Desktop タスクが更新されたスキルを認識しても、更新された MCP ツールを認識しない場合は、Codex Desktop を再起動して別のタスクを作成してください。Desktop プロセスは再インストール後も MCP レジストリを保持する可能性があります。
インストールされたバンドルには以下が含まれます:
plugins/grok-plugin-codex/dist/server.js
plugins/grok-plugin-codex/dist/job-worker.js機能面
grok_check,grok_models: CLI/機能、認証、権限、モデルの診断。authenticatedとentitledはtrue、false、または"unknown"のいずれかであり、nullになることはありません。grok_run,grok_continue: 明示的なプロンプト実行と既知のセッションの継続。grok_finalize: 1ターン、ツールなし、完全な回答 — タイムアウト、ターン制限、キャンセル、または権限ブロックされた実行のためのリカバリ。grok_rescue,grok_review,grok_adversarial_review: 強制読み取り専用、サブエージェントなしのセカンドパス。それぞれにtarget(またはproblem)が必要で、兄弟プラグインの名前promptも受け入れます。grok_adversarial_reviewはオプションのthreatModelを受け取り、それ以外の所見は参考情報であり、ブロックしない場合があります。grok_sessions,grok_export: 明示的ワークスペースのセッション検査と Markdown エクスポート。grok_status,grok_result,grok_cancel: プライベートな中央バックグラウンドジョブのライフサイクル。jobIdのみで操作します。grok_statusは安価な進捗(textChars、eventCounts、lastEventAt、toolCallCount、deniedToolCalls)を返し、オプションのwaitMs(≤ 30 秒)サーバー側待機を受け付けます。grok_resultはfinalTextOffset/finalTextMaxCharsでfinalTextをページングします。
正確な引数については、現在の MCP listTools スキーマが信頼できる情報源です。リポジトリのスモークテストは公開された表面をロックし、ドリフトを拒否します。
結果契約
成功した操作は以下を返します:
{ "ok": true, "data": {}, "error": null, "warnings": [] }ビジネス上の失敗は MCP isError: true を設定し、以下を返します:
{
"ok": false,
"data": null,
"error": { "code": "typed_code", "message": "actionable message", "retryable": false },
"warnings": []
}入力スキーマ違反は、プラグインのビジネスエンベロープなしで SDK 生成のツールエラー(isError: true)となります。クライアントはプロミス拒否のみに依存するのではなく、解決されたツール結果を検査する必要があります。すべてのツールは出力スキーマを公開し、プラグインが処理した JSON テキストは structuredContent を反映します。
ワークスペースとプロンプトの境界
ワークスペース操作には cwd が必要です。サーバーはシンボリックリンクを正規化し、解決されたディレクトリがアクティブな MCP ワークスペースルート内に留まることを要求します。~/.codex などのプライベートな Codex パスは、ユーザーが明示的にそのリスクを承認しない限りブロックされます。
プロンプトは、デタッチされたワーカーが MCP サーバーの終了後も存続できるよう、プライベートな 0600 ファイルに一時的にステージングされます。ワーカーは Grok の実行前にステージングファイルを読み取り削除し、ランダムな 0700 ディレクトリ内の 0600 FIFO を介してプロンプトを提供します。Grok はネイティブの --prompt-file を通じてそのプライベートなパス名のみを受け取ります。ランチャーは Grok がファイルを開くとすぐに、プロンプトバイトを書き込む前にリンクを解除します。プロンプトテキストは子プロセスの引数リストやジョブレコードには配置されません。GROK_BIN はサポートされている唯一のカスタム実行可能ファイル設定であり、信頼された MCP 環境からのものでなければなりません。
バックグラウンドジョブ
バックグラウンドジョブはデタッチされたワーカーで実行され、MCP サーバーの再起動後も存続します。状態は以下の場所に保存されます:
$GROK_PLUGIN_STATE_DIR(明示的に設定されている場合)$XDG_STATE_HOME/grok-plugin-codex~/.local/state/grok-plugin-codex
明示的な状態ディレクトリは、アクティブなすべてのワークスペースルートと互いに素でなければなりません。つまり、ルートの内部でも祖先でもあってはなりません。空であるか、プラグインの所有権マーカーを持っているか、厳格なプライベート事前マーカージョブレイアウトと一致する必要があります。プラグインは既存の共有ディレクトリを主張したり chmod したりしません。これらのチェックは、リポジトリローカルの状態を作成または変更する前に、失敗時にクローズされます。
ディレクトリは 0700 を使用し、レコード、ログ、プロンプトステージングファイル、キャンセルマーカー、ハートビート、および所有権トークンのプロセス間ロックは 0600 を使用します。レコードの書き込みはアトミックであり、終了ステータスは単調です。キャンセルは、所有ワーカーによって消費されるマーカーによって線形化されます。各プロセスグループは、コマンド ID にジョブ ID とランダムなジョブトークンを含むプライベートランチャーによって主導されます。古いワーカーの調整は、3つすべてが一致する場合にのみ永続化されたグループを終了し、ランチャーは終了前に残りの子孫を削除します。
ディスパッチツール(grok_run、grok_review、grok_adversarial_review、grok_rescue)はデフォルトで background: true になります。grok_continue はデフォルトでフォアグラウンドです。data.job.id を保存し、jobId を使用してジョブツールを呼び出します。フォアグラウンド呼び出し(background: false)は、最大 timeoutMs に 10 秒の猶予を加えた時間ブロックし、その後 foreground_wait_timeout とそのジョブ ID を返します。timeoutMs が省略された場合のデフォルトは種類ごとに異なります — run/continue は 180000、review/rescue は 240000、adversarial_review は 300000 — 明示的な値はどちらの方向にもクランプされません。両方の有効値は effectiveTimeoutMs / effectiveMaxTurns として返されます。バックグラウンドジョブの推奨リズムは、1回の grok_status(waitMs 付き)、次に1回の grok_result であり、ポーリングループではありません。この組み合わせのみが最終的です:
data.resultComplete === true内部的には、完全性には空でない最終テキストと通常の終了イベントも必要であり、grok_review および grok_adversarial_review の場合は少なくとも1回のツール呼び出しが必要です。なぜなら、何も開かなかったレビューアからの判定は意見(no_evidence_review)だからです。読み取り専用の種類は計画モードで実行され、シェル実行は自動的に拒否されます。レビューに必要な差分やコマンド出力をターゲットにインライン化してください。シェルコマンドの承認が必要なためにキャンセルされた実行は、ターゲットが広すぎるのではなく、permission_denied_headless として報告されます。停止理由は大文字小文字と区切り文字に依存せずに正規化され(end_turn と EndTurn は同一の事実)、生の値は outputSummary.stopReason に保持され、呼び出し元は自分で文字列マッチングを行ってはなりません。キャンセルされた終了は cancelled_output として返されます。実際のテキストの後に認識されない停止理由があった場合は、破棄される代わりに stopReasonRecognised: false と警告付きで受け入れられます。
不完全な結果にはすべてリカバリハンドルが付属します — 失敗したフォアグラウンド呼び出しの場合は error.details.recovery、grok_result の場合は data.recovery — 形状は { jobId, grokSessionId, partialTextChars, suggested: { tool: "grok_finalize", args }, fallback: { tool: "grok_continue", args } } です。ハンドルはそのまま実行可能です。suggested は1回の呼び出しによるリカバリであり、fallback は grok_continue のみを話す呼び出し元のために同じことを詳細に示したものです(maxTurns: 1 と grok_finalize プロンプト付き)。どちらも短縮された回答を要求しません。max_turns_reached およびキャンセルまたはタイムアウトした実行の対処法は、そのジョブ ID を使用した grok_finalize、または手動での同じ呼び出しです。同じセッションを maxTurns: 1 で継続し、Grok にツールの使用を停止して今すぐ最終回答を出力するよう指示するプロンプトを送ります。ターゲットを狭めたり、maxTurns を増やしたり、タスクを再実行したりしないでください。部分的な回答は決して破棄されず、error.details.finalTextRef はジョブ ID であり、grok_result は resultComplete の値に関係なく、キャプチャされた完全なテキストを返します。
resultComplete はそれ自体で切り詰めを考慮します。outputTruncated は共有キャプチャウィンドウがオーバーフローしたことのみを示し(通常はツール呼び出しのエコー)、textTruncated は回答テキストがドロップされたことを示し、完全性を無効にするフラグです。過大なツールペイロードはキャプチャ時に省略され、available_commands ペイロードはドロップされます。プラグイン開発のためにベンダーストリームをそのまま保持するには、GROK_PLUGIN_RAW_CAPTURE=1 を設定します。
data.finalText を使用してください。部分的な状態は診断のみであり、生のトークン単位のログ末尾は grok_result が includeRawTail: true で呼び出された場合にのみ返されます。ワーカーは回答を追記専用の <id>.final.txt 台帳に、ストリームの事実を <id>.summary.json に保持するため、grok_result は生のストリームを再解析する代わりにその台帳から回答し、grok_status は同じファイルから進捗を読み取ります。終了したジョブのアーティファクトは7日間保持され、日和見的にクリーンアップされます。
0.1 からのアップグレード
アップグレード前に 0.1 のバックグラウンドジョブを完了またはキャンセルしてください。
0.2 は古い
<workspace>/.grok-plugin-codex/jobsレコードをスキャンしたり信頼したりしません。古いワークスペースディレクトリはユーザーのワークスペースに属するため、自動的には削除されません。
呼び出しごとの実行可能ファイル選択、呼び出し元が選択したエクスポートファイル、暗黙のレビューターゲット、およびジョブ制御の
cwdは削除されました。
プライバシー境界
プラグインは、非表示の Codex コンテキスト、システム/開発者メッセージ、推論、任意のツール出力、シークレット、または資格情報をプロンプトにコピーしません。呼び出し元が明示的に提供した機密テキストを編集することはできません。docs/privacy.md を参照してください。
開発
npm install
npm run check
git diff --checkオプションの認証付き呼び出し:
npm run smoke:live-grokランタイムスキーマとテストが信頼できる情報源です。バンドルされた README/スキルファイルはインストールされたユーザー契約です。test/contract-drift.test.ts と MCP スモークテストにより、削除された引数や不一致のバージョンが再出現するのを防ぎます。
docs/development.md および docs/verification.md を参照してください。
プロジェクトポリシー
Available Tools
12 toolsgrok_adversarial_reviewGrok Adversarial ReviewB
Ask Grok for a bounded failure-mode review with at most 5 findings.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| target | No | Review target. Defaults to current working tree. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full burden of disclosing behavioral traits. It only mentions a limit of 5 findings, leaving unclear whether the tool is read-only, what side effects occur, or how background execution (parameter 'background') affects behavior. Essential safety details are missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 12 words, front-loading the action and key constraint ('at most 5 findings'). Every word carries weight; it is maximally concise without sacrificing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, 12 parameters, and the complexity of invoking an external binary, the description is too sparse. It does not explain what constitutes a 'failure-mode review,' how findings are presented, error handling, or how parameters like 'background' or 'model' affect behavior. Much needed context is absent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is high (92%), so the baseline is 3. The description adds no additional parameter context beyond the overall purpose, but the schema already documents most parameters well. The description does not compensate for the uncovered ~8% or enrich parameter meanings.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool asks Grok for a 'bounded failure-mode review with at most 5 findings,' specifying a distinct verb ('Ask') and resource type. It distinguishes itself from the sibling tool 'grok_review' by emphasizing boundedness and failure-mode focus.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for adversarial or security-related failure analysis, and the 'bounded' qualifier hints at scenarios needing limited findings. However, it lacks explicit guidance on when to use this versus sibling tools like 'grok_review' or 'grok_run', and does not mention prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_cancelCancel Grok JobC
Cancel a running background Grok job.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| jobId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description must disclose behavioral traits. It only states the action but omits side effects (e.g., whether the job is terminated or can be resumed), permission requirements, or impact on other jobs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at one sentence, but it lacks structure and fails to include critical details. It earns a middle score for brevity without completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 2 parameters, no output schema, and no annotations, the description is insufficient. It does not cover prerequisites, return behavior, or error conditions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description adds no meaning to the parameters. It does not explain 'cwd' or how to obtain 'jobId,' leaving the agent to guess.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Cancel' and the resource 'a running background Grok job,' which is distinct from sibling tools like grok_run or grok_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, nor when not to use it. For example, it doesn't mention whether cancel requires the job to be running or if it works on queued jobs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_checkCheck GrokC
Discover Grok CLI, run grok --version, and detect login/model availability with grok models.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| includeModels | No | ||
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, and the description does not disclose behavioral traits such as read-only nature, side effects, or authentication needs. The actions described (run, detect) imply reading but are not explicitly stated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise but lacks structure. It fails to prioritize key information or provide a clear summary upfront.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 12 parameters, no output schema, and 12 sibling tools, the description is insufficient. It does not explain how parameters affect behavior, what the output is, or how this tool fits into the broader toolset.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 83% schema description coverage, the schema already describes most parameters. The tool description adds no additional parameter context, so a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description lists specific actions (Discover CLI, run version, detect model availability), but it is vague about the overall purpose and does not distinguish this tool from siblings like grok_models, which also deals with model detection.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as grok_models or grok_run. The description lacks context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_continueContinue Grok SessionB
Continue a Grok session with --resume or, only when explicitly requested, --continue.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| prompt | Yes | Prompt to send while continuing the Grok session. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| sessionId | No | ||
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| continueLatest | No | ||
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It only mentions command-line flags without explaining side effects, return values, permissions, or whether the operation is destructive. This is insufficient for a tool with 14 parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is concise but lacks structure. Given the tool's complexity (14 parameters), it could include more organized information such as usage patterns or prerequisites without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 14 parameters, no output schema, and no annotations. The description does not cover return behavior, error conditions, or whether the session runs synchronously. This incompleteness leaves the agent with insufficient context to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is high (79%), so the baseline is 3. The description adds modest value by clarifying that '--continue' should be used only when explicitly requested, likely referring to the 'continueLatest' parameter. However, many parameters remain unaddressed, and the description does not compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool's purpose: continuing a Grok session, using '--resume <sessionId>' or '--continue'. It distinguishes from likely sibling 'grok_run' (which starts a new session) through the verb 'continue', though it does not explicitly name the alternative.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies using '--resume <sessionId>' or '--continue' only when explicitly requested, giving some usage guidance. However, it lacks explicit when-not-to-use advice or references to alternative tools like 'grok_run' for new sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_exportExport Grok SessionB
Wrap grok export and return Markdown from stdout by default.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| sessionId | Yes | ||
| timeoutMs | No | ||
| outputFile | No | Optional filesystem output path. Omit to return Markdown. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description reveals that the tool wraps a shell command and returns stdout as Markdown, and mentions an optional output file. However, it does not disclose side effects, required permissions, or what happens in error cases. Given no annotations, this is moderately transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that efficiently conveys the core function. No unnecessary words, though it could be slightly more structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the 5 parameters and no output schema, the description provides minimal completeness. It explains the default return behavior but omits details like error handling or default values for optional parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already covers 60% of parameters with descriptions. The tool description does not add any new semantic information beyond what is in the schema, so the baseline score applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool exports a Grok session and returns Markdown. The verb 'export' and resource 'Grok session' are specific, but it does not distinguish from siblings like 'grok_run' or 'grok_result'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. The description does not provide context for when exporting is appropriate or mention any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_modelsList Grok ModelsD
Return raw and parsed grok models output.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only says 'Return', which weakly implies a read operation, but fails to explain side effects, authorization needs, rate limits, or other important behaviors for a tool with many parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely short but under-specifies the tool. It lacks necessary detail, making it more inadequate than concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is insufficient for a tool with 11 parameters and no output schema. It does not explain return values, parameter interactions, or how the raw/parsed outputs differ.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 91%, so the schema already describes parameters well. The description adds no additional meaning beyond the schema, meeting the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Return raw and parsed grok models output' is vague. While the title suggests listing models, the description does not clearly state that it lists available models, nor does it distinguish from sibling tools like grok_run or grok_check.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool vs alternatives. There is no mention of context, prerequisites, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_rescueGrok RescueA
Ask Grok for an independent read-only diagnosis and minimal path forward.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| problem | Yes | Problem statement and visible context to diagnose. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full transparency burden. It clearly communicates that the tool is read-only and provides a 'minimal path forward,' indicating no destructive actions. It does not elaborate on behaviors like background execution or timeouts (covered in parameters), but the core behavioral trait is well-disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that immediately conveys the core purpose. It is front-loaded and contains no redundant or extraneous words. Every part of the sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 12 parameters, 1 required, and no output schema, the description is minimal. It does not explain what the output looks like (e.g., text diagnosis) or how 'minimal path forward' is structured. For a crisis-oriented tool ('rescue'), more context on expected output or success criteria would be beneficial. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 92%, so the schema already documents 11 of 12 parameters well. The description adds no parameter-specific information beyond the schema. Baseline 3 is appropriate since the description does not compensate for the 8% undocumented parameter (timeoutMs lacks a description in schema) nor adds extra meaning.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Ask Grok for an independent read-only diagnosis and minimal path forward.' It uses a specific verb ('Ask'), a specific resource ('Grok'), and qualifies the interaction as read-only and minimal. This distinguishes it from sibling tools like grok_run (full execution) or grok_review (comprehensive review).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for quick, safe diagnosis without modifications ('read-only'). However, it does not explicitly state when to use this tool over alternatives or provide exclusion criteria. Given the context of siblings, the guidance is clear enough but lacks explicit when-not-to-use instructions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_resultGrok Job ResultC
Read stdout/stderr tails and parsed outputSummary for a background Grok job.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| jobId | Yes | ||
| maxChars | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description indicates a read operation but lacks details on side effects, permissions, error states (e.g., job not found), or limits. Without annotations, the description carries the full burden and fails to disclose important behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no redundancy. However, it is overly brief and omits critical information, making it less effective despite being short.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 3 parameters, no output schema, and no annotations, the description is insufficient. It does not explain the output format, what 'parsed outputSummary' entails, or how maxChars affects results, leaving the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description does not explain any of the three parameters (cwd, jobId, maxChars). It provides no semantic meaning beyond what the schema's property names imply.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Read' and resources 'stdout/stderr tails' and 'parsed outputSummary' for a background Grok job. It effectively distinguishes from sibling tools like grok_run or grok_status by specifying it retrieves results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as grok_status or grok_check. The description does not mention prerequisites like job completion or that this should be used after grok_run.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_reviewGrok ReviewC
Ask Grok for a bounded findings-first review of a target such as the current diff.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| target | No | Review target. Defaults to current working tree. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must disclose behavioral traits. It only mentions 'bounded findings-first review' without explaining side effects, authorization needs, output format, or whether the tool runs synchronously or in background.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant words. It is concise, but could benefit from additional context without losing efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 12 parameters, no output schema, and no behavioral transparency. The description fails to explain return values, execution behavior, or how to use the results, which is insufficient for an agent to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is high (92%), so by baseline, the description need not detail parameters. However, the description adds no context about parameter significance or defaults, leaving the agent to rely solely on the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Ask Grok for a bounded findings-first review' and provides an example target ('the current diff'). It distinguishes the tool as a review tool among siblings, but the term 'bounded findings-first' may not be universally clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use grok_review versus sibling tools like grok_check, grok_run, or grok_adversarial_review. The description does not specify prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_runRun GrokA
Run a Grok prompt in foreground JSON mode or background streaming-json mode.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| prompt | Yes | Prompt to send to Grok. Put task text here; do not ask Grok to read Codex private runtime paths such as ~/.codex unless explicitly authorized. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the burden. It mentions foreground and background modes but does not disclose side effects, authentication needs, rate limits, or what happens during execution. Minimal behavioral context beyond schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, zero wasted words, front-loaded with action and resource. Perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 12 parameters (though well-documented in schema), no output schema, and no mention of how to retrieve results or handle background jobs, the description is incomplete. It lacks guidance on output format, result retrieval via sibling tools, and error handling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 92%, so the schema already documents most parameters. The description adds no new meaning beyond what schema provides; the background mode is implied but not elaborated. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (run) and resource (Grok prompt), and distinguishes between foreground JSON mode and background streaming-json mode, which differentiates it from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies two modes but provides no explicit guidance on when to use each mode or when to prefer this tool over siblings like grok_continue or grok_check. No when-not-to-use or alternatives mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_sessionsGrok SessionsC
Wrap grok sessions list/search and return raw output.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| limit | No | ||
| query | No | ||
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| timeoutMs | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only mentions returning raw output, but does not disclose side effects, authentication requirements, or rate limits. Lack of behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is concise, but lacks structure. It could be improved with sections or bullet points. Adequate but not exceptional.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 5 parameters, no output schema, and no annotations, the description is too brief. It does not explain what a session is, what raw output contains, or how parameters affect behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 40% (2 of 5 parameters have descriptions). The tool description does not add any parameter meaning beyond what the schema provides, failing to compensate for low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states it wraps grok sessions list/search and returns raw output, but it's ambiguous whether it lists, searches, or both. It does not distinguish from sibling tools like grok_status or grok_check.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The description does not mention prerequisites or use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_statusGrok Job StatusC
Read a background Grok job record.
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | ||
| jobId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It says 'Read', implying idempotent and non-destructive behavior, but does not disclose any side effects, authentication requirements, or rate limits. It lacks details about what happens if the job does not exist or how recent the data is.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise. However, it is too brief and lacks structure. It could be expanded to include key details without becoming verbose. The sentence earns its place but misses opportunities to add value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and annotations, the description should explain what the tool returns (e.g., job status, progress). It does not, leaving the agent to guess the response format. For a simple read tool, completeness is lacking.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain any parameters. There are two parameters (cwd and jobId) with no meaning added beyond the schema's type and required flag. The description should clarify, for example, the format of jobId or the role of cwd.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Read a background Grok job record', which uses a specific verb and resource. However, 'background Grok job record' is somewhat generic; a job status is implied. It distinguishes from sibling tools like grok_run or grok_cancel, but could be more explicit about what a 'job record' entails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. Given sibling tools like grok_check or grok_result, there is no context about the typical workflow or conditions under which grok_status should be called first.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
12 tool updates
v0.1.0- First observed
grok_adversarial_review - First observed
grok_cancel - First observed
grok_check - First observed
grok_continue - First observed
grok_export - First observed
grok_models - First observed
grok_rescue - First observed
grok_result - First observed
grok_review - First observed
grok_run - First observed
grok_sessions - First observed
grok_status
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose, from running prompts to managing jobs and sessions. Overlaps like review/adversarial_review are differentiated by descriptions.
All tools follow the consistent 'grok_verb' or 'grok_noun' snake_case pattern, making it easy to predict tool names.
12 tools is well-scoped for a CLI wrapper, covering setup, execution, session management, and review without being excessive.
The tool surface covers the full lifecycle: check, run, manage sessions, review, and retrieve results. No obvious missing operations for the domain.
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that wraps the Grok CLI to enable code review, adversarial testing, and chat with xAI's Grok model, integrating into any MCP host as a peer reviewer, adversary, and consultant.482 npm11MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the local Grok Build CLI, enabling Codex to delegate code reviews, bounded coding tasks, and setup diagnostics to Grok for a second opinion or parallel processing.5Apache 2.0
- FlicenseAqualityBmaintenanceMCP server that exposes grok-ask and grok-workflow tools, enabling Claude Code to delegate to Grok for consult/worker tasks and run adversarial multi-agent workflow panels.3-
- AlicenseNot gradedqualityCmaintenanceEnables Grok Build to orchestrate the local Codex CLI for code reviews, adversarial reviews, task rescue, session transfer, and background job management through MCP tools.1Apache 2.0