Grok Plugin Codex
Grok Plugin Codex
grok-plugin-codex expone una CLI de Grok instalada localmente a Codex a través de un servidor MCP empaquetado en Node/TypeScript. Codex sigue siendo responsable del ámbito, el estado del espacio de trabajo, la verificación, git y el juicio final; Grok es una segunda superficie acotada.
La versión 0.3.0 es la versión actual. Normaliza el vocabulario de motivos de parada de Grok (end_turn y EndTurn son un mismo hecho), clasifica correctamente los tiempos de espera y el agotamiento de cuotas, establece por defecto las herramientas de envío en segundo plano con presupuestos de tiempo por tipo, devuelve un identificador de recuperación en cada resultado no completo, se niega a informar de un veredicto alcanzado sin una sola llamada a herramienta como una revisión completada y añade grok_finalize — la única forma de recuperar una respuesta ya existente en un solo turno y sin herramientas. Consulte CHANGELOG.md para conocer los cambios completos del contrato. La versión 0.2 introdujo la arquitectura de trabajador central privado y los sobres MCP tipados.
Repositorio: https://github.com/handong66/grok-plugin-codex Artículo: https://han-dong.link/en/work/grok-plugin-codex
Requisitos
Node.js
>=22npm
macOS o Linux
Soporte del mercado de plugins locales de Codex
CLI de Grok instalada y autenticada
Verifique las tres capas de tiempo de ejecución por separado:
grok --version # CLI can be discovered
grok --help # installed flags/capabilities
grok models # authentication and model listingUn modelo listado no ha completado necesariamente una invocación real. grok_check preserva esa distinción.
Related MCP server: Grok Build Bridge
Instalación
npm install
npm run check
codex plugin marketplace add .
codex plugin add grok-plugin-codex --marketplace grok-plugin-codexInicie una nueva tarea de Codex después de la instalación o actualización. Las tareas existentes conservan la instantánea del servidor MCP y la habilidad con la que comenzaron. Si una nueva tarea de Codex Desktop ve la habilidad actualizada pero no las herramientas MCP actualizadas, reinicie Codex Desktop y cree otra tarea; el proceso de Desktop puede retener su registro MCP durante la reinstalación.
El paquete instalado contiene ambos:
plugins/grok-plugin-codex/dist/server.js
plugins/grok-plugin-codex/dist/job-worker.jsSuperficie de capacidades
grok_check,grok_models: diagnóstico de CLI/capacidad, autenticación, derecho y modelo.authenticatedyentitledsontrue,falseo"unknown"— nuncanull.grok_run,grok_continue: ejecución explícita de indicaciones y continuación de sesión conocida.grok_finalize: un turno, sin herramientas, respuesta completa: la recuperación para una ejecución con tiempo de espera agotado, límite de turnos alcanzado, cancelada o bloqueada por permisos.grok_rescue,grok_review,grok_adversarial_review: segundas pasadas de solo lectura forzadas, sin subagentes. Cada una necesita untarget(oproblem), para el cual también se acepta el nombre de la habilidad hermanaprompt.grok_adversarial_reviewtoma unthreatModelopcional; los hallazgos fuera de él son solo consultivos y pueden no bloquear.grok_sessions,grok_export: inspección de sesiones del espacio de trabajo explícito y exportación a Markdown.grok_status,grok_result,grok_cancel: ciclo de vida privado de trabajos en segundo plano central solo porjobId.grok_statusdevuelve progreso ligero (textChars,eventCounts,lastEventAt,toolCallCount,deniedToolCalls) y toma unwaitMsopcional (≤ 30 s) de espera del lado del servidor;grok_resultpaginafinalTextconfinalTextOffset/finalTextMaxChars.
El esquema actual de listTools de MCP es la autoridad para los argumentos exactos. La prueba de humo del repositorio bloquea la superficie publicada y rechaza la desviación.
Contrato de resultados
Las operaciones exitosas devuelven:
{ "ok": true, "data": {}, "error": null, "warnings": [] }Los fallos de negocio establecen isError: true de MCP y devuelven:
{
"ok": false,
"data": null,
"error": { "code": "typed_code", "message": "actionable message", "retryable": false },
"warnings": []
}Las violaciones del esquema de entrada son errores de herramienta generados por el SDK (isError: true) sin el sobre de negocio del plugin; los clientes deben inspeccionar el resultado resuelto de la herramienta en lugar de confiar solo en el rechazo de la promesa. Cada herramienta publica un esquema de salida, y el texto JSON manejado por el plugin refleja structuredContent.
Límites del espacio de trabajo y las indicaciones
Las operaciones del espacio de trabajo requieren cwd. El servidor canoniza los enlaces simbólicos y requiere que el directorio resuelto permanezca dentro de una raíz activa del espacio de trabajo de MCP. Las rutas privadas de Codex como ~/.codex están bloqueadas a menos que el usuario autorice explícitamente ese riesgo.
Las indicaciones se almacenan brevemente en archivos privados 0600 para que un trabajador desacoplado pueda sobrevivir a la salida del servidor MCP. El trabajador lee y elimina el archivo de almacenamiento antes de que Grok se ejecute, luego suministra la indicación a través de un FIFO 0600 dentro de un directorio aleatorio 0700. Grok recibe solo ese nombre de ruta privado a través de --prompt-file nativo; el lanzador lo desvincula tan pronto como Grok lo abre, antes de escribir cualquier byte de indicación. El texto de la indicación no se coloca en la lista de argumentos del proceso hijo ni en el registro del trabajo. GROK_BIN es la única configuración de ejecutable personalizado admitida y debe provenir del entorno MCP de confianza.
Trabajos en segundo plano
Los trabajos en segundo plano se ejecutan en un trabajador desacoplado y sobreviven a los reinicios del servidor MCP. El estado reside bajo:
$GROK_PLUGIN_STATE_DIR, cuando se configura explícitamente;$XDG_STATE_HOME/grok-plugin-codex;~/.local/state/grok-plugin-codex.
Un directorio de estado explícito debe ser disjunto de cada raíz activa del espacio de trabajo: ni dentro de una raíz ni un ancestro de una. Debe estar vacío, llevar la marca de propiedad del plugin o coincidir con el diseño estricto de trabajos previo a la marca privada; el plugin no reclamará ni hará chmod de un directorio compartido existente. Estas comprobaciones fallan de forma segura antes de crear o cambiar el estado local del repositorio.
Los directorios usan 0700; los registros, registros, archivos de almacenamiento de indicaciones, marcadores de cancelación, latidos y bloqueos entre procesos con token de propietario usan 0600. Las escrituras de registros son atómicas y el estado terminal es monótono. La cancelación se linealiza mediante un marcador consumido por el trabajador propietario. Cada grupo de procesos está liderado por un lanzador privado cuya identidad de comando incluye el ID del trabajo y un token de trabajo aleatorio; la reconciliación de trabajadores obsoletos termina un grupo persistido solo cuando los tres coinciden, y el lanzador elimina los descendientes residuales antes de salir.
Las herramientas de envío (grok_run, grok_review, grok_adversarial_review, grok_rescue) tienen por defecto background: true; grok_continue tiene por defecto primer plano. Guarde data.job.id, luego llame a las herramientas de trabajo con jobId. Una llamada en primer plano (background: false) bloquea durante un máximo de timeoutMs más un período de gracia de 10 s y luego devuelve foreground_wait_timeout con ese ID de trabajo. Un timeoutMs omitido tiene un valor predeterminado por tipo: run/continue 180000, review/rescue 240000, adversarial_review 300000 — y un valor explícito nunca se ajusta en ninguna dirección; ambos valores efectivos se devuelven como effectiveTimeoutMs / effectiveMaxTurns. El ritmo recomendado para un trabajo en segundo plano es un grok_status con waitMs, luego un grok_result, en lugar de un bucle de sondeo. Solo esta combinación es definitiva:
data.resultComplete === trueInternamente, la completitud también requiere texto final no vacío y un evento final normal, y — para grok_review y grok_adversarial_review — al menos una llamada a herramienta, ya que un veredicto de un revisor que no abrió nada es una opinión (no_evidence_review). Los tipos de solo lectura se ejecutan en modo plan, donde la ejecución de shell se rechaza automáticamente: incluya el diff o la salida del comando que la revisión necesita en el objetivo, y una ejecución que se canceló porque un comando de shell necesitaba aprobación se informa como permission_denied_headless en lugar de como un objetivo que era demasiado amplio. Los motivos de parada se normalizan sin distinción de mayúsculas y minúsculas ni separadores (end_turn y EndTurn son el mismo hecho), el valor sin procesar se conserva en outputSummary.stopReason, y los llamantes no deben hacer coincidencias de cadenas ellos mismos. Un final cancelado se devuelve como cancelled_output. Un motivo de parada no reconocido después de texto real se acepta con stopReasonRecognised: false más una advertencia en lugar de descartarse.
Cada resultado no completo lleva un identificador de recuperación — error.details.recovery en una llamada en primer plano fallida, data.recovery en grok_result — con la forma { jobId, grokSessionId, partialTextChars, suggested: { tool: "grok_finalize", args }, fallback: { tool: "grok_continue", args } }. El identificador se puede ejecutar tal cual: suggested es la recuperación de una llamada, y fallback es lo mismo expresado para un llamante que solo habla grok_continue (maxTurns: 1 más la indicación de grok_finalize). Ninguno pide una respuesta abreviada. El remedio para max_turns_reached y para una ejecución cancelada o con tiempo de espera agotado es grok_finalize con ese ID de trabajo, o la misma llamada manualmente: continúe la misma sesión con maxTurns: 1 y una indicación diciéndole a Grok que deje de usar herramientas y emita la respuesta final ahora. No reduzca el objetivo, aumente maxTurns ni vuelva a ejecutar la tarea: la respuesta parcial nunca se destruye, error.details.finalTextRef es el ID del trabajo, y grok_result devuelve el texto capturado completo independientemente de lo que diga resultComplete.
resultComplete explica el truncamiento por sí mismo: outputTruncated solo dice que la ventana de captura compartida se desbordó, que normalmente es eco de llamada a herramienta, mientras que textTruncated dice que se descartó texto de respuesta y es la bandera que veta la completitud. Las cargas útiles de herramientas demasiado grandes se eliden en el momento de la captura y las cargas útiles de available_commands se descartan; configure GROK_PLUGIN_RAW_CAPTURE=1 para mantener la secuencia del proveedor literalmente para el desarrollo del plugin.
Use data.finalText. Los estados parciales son solo de diagnóstico, y los registros de cola sin procesar por token se devuelven solo cuando se llama a grok_result con includeRawTail: true. El trabajador mantiene la respuesta en un libro mayor <id>.final.txt de solo anexión y los hechos de la secuencia en <id>.summary.json, por lo que grok_result responde desde ese libro mayor en lugar de volver a analizar la secuencia sin procesar, y grok_status lee el progreso del mismo archivo. Los artefactos de trabajo terminal se conservan durante siete días y se limpian oportunistamente.
Actualización desde 0.1
Termine o cancele los trabajos en segundo plano de 0.1 antes de actualizar.
0.2 no escanea ni confía en registros antiguos de
<workspace>/.grok-plugin-codex/jobs.Los directorios de espacio de trabajo antiguos no se eliminan automáticamente porque pertenecen al espacio de trabajo del usuario.
Se eliminan la selección de ejecutable por llamada, los archivos de exportación seleccionados por el llamante, los objetivos de revisión implícitos y el
cwdde control de trabajos.
Límite de privacidad
El plugin no copia el contexto oculto de Codex, mensajes de sistema/desarrollador, razonamiento, salida arbitraria de herramientas, secretos o credenciales en las indicaciones. No puede redactar texto sensible que un llamante proporcione explícitamente. Consulte docs/privacy.md.
Desarrollo
npm install
npm run check
git diff --checkInvocación autenticada opcional:
npm run smoke:live-grokLos esquemas de tiempo de ejecución y las pruebas son la autoridad. Los archivos README/skill empaquetados son el contrato del usuario instalado; test/contract-drift.test.ts y la prueba de humo de MCP evitan que aparezcan argumentos eliminados o versiones no coincidentes.
Consulte docs/development.md y docs/verification.md.
Políticas del proyecto
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