Grok Plugin Codex
Grok 插件 Codex
grok-plugin-codex 通过一个捆绑的 Node/TypeScript MCP 服务器,向 Codex 暴露本地安装的 Grok CLI。Codex 仍然负责作用域、工作区状态、验证、git 和最终判断;Grok 是一个有限的第二平面。
当前版本为 0.3.0。它规范了 Grok 的停止原因词汇(end_turn 和 EndTurn 视为同一事实),正确分类超时和配额耗尽,将调度工具默认设为后台并附带按种类的时限预算,在每一个非完整结果上返回恢复句柄,拒绝将在没有一次工具调用的情况下得出的判断报告为已完成审查,并新增了 grok_finalize —— 一种单轮、无工具的方式来恢复已存在的答案。有关完整的合约变更,请参阅 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
请分别检查三个运行时层面:
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:单轮、无工具、完整答案——用于恢复因超时、达到轮数限制、取消或被权限阻止的运行。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),不带插件业务信封;客户端必须检查已解析的工具结果,而不是仅依赖 promise 拒绝。每个工具都发布输出模式,插件处理的 JSON 文本反映了 structuredContent。
工作区和提示边界
工作区操作需要 cwd。服务器规范化符号链接,并要求解析后的目录必须位于活跃的 MCP 工作区根目录内。私有 Codex 路径(如 ~/.codex)被阻止,除非用户明确授权该风险。
提示会短暂地暂存在私有的 0600 文件中,以便分离的工作进程能在 MCP 服务器退出后存活。工作进程在 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 和随机任务令牌;过期工作进程的协调仅在所有三个匹配时终止持久组,启动器在退出前会移除残留的后代进程。
调度工具(grok_run、grok_review、grok_adversarial_review、grok_rescue)默认 background: true;grok_continue 默认为前台。保存 data.job.id,然后使用 jobId 调用任务工具。前台调用(background: false)最多阻塞 timeoutMs 加上 10 秒宽限期,然后返回带有该任务 ID 的 foreground_wait_timeout。省略的 timeoutMs 按种类默认——run/continue 为 180000,review/rescue 为 240000,adversarial_review 为 300000——显式值在任何方向上都不会被截断;两个有效值都会作为 effectiveTimeoutMs/effectiveMaxTurns 返回。对于后台任务,推荐的节奏是先调用一次 grok_status 带上 waitMs,然后调用一次 grok_result,而不是轮询循环。只有以下组合是最终的:
data.resultComplete === true在内部,完整性还需要非空的最终文本和正常结束事件,并且对于 grok_review 和 grok_adversarial_review,需要至少一次工具调用,因为一个未打开任何内容的审查者得出的判断只是意见(no_evidence_review)。只读种类以计划模式运行,其中 shell 执行会被自动拒绝:将审查所需的差异或命令输出内联到目标中,而因为 shell 命令需要批准而被取消的运行会报告为 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 是单次调用的恢复,而 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 从同一文件中读取进度。终端任务工件保留七天,并会被机会性地清理。
从 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