Skip to main content
Glama

ChatGPT code review

chatgpt_code_review
Read-only

Review code for bugs, security issues, performance, and readability using ChatGPT or another configured AI provider, with severity ratings and suggested fixes.

Instructions

Have ChatGPT (or any AI, via provider) review code for bugs, security problems, performance and readability, with severity ratings and suggested fixes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "chatgpt_code_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code to review.
focusNoOptional: limit the review to these areas.
modelNoModel ID for the chosen provider, e.g. 'gpt-5.6-sol' or 'gemini-3.8-flash'. You can also write 'provider:model', e.g. 'xai:grok-4.6'. Leave empty to use that provider's default.
contextNoOptional: what the code is meant to do, or the surrounding system.
languageNoProgramming language, e.g. 'TypeScript'.
providerNoWhich AI to ask: openai (ChatGPT), anthropic (Claude), gemini, xai (Grok), deepseek, mistral, meta (Llama), perplexity, moonshot (Kimi), qwen, cohere, groq, openrouter, ollama or lmstudio. Leave empty for the default. Run ai_list_providers to see which are configured.
temperatureNoCreativity, 0 to 2. Lower is more focused. Some reasoning models ignore this; the bridge drops it automatically.
reasoning_effortNoFor reasoning models only: how hard the model should think. Higher is slower and more expensive.
max_output_tokensNoUpper limit on the length of ChatGPT's reply, in tokens.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds value by disclosing the output shape (severity ratings and suggested fixes), which annotations cannot convey, but it omits notable behavior such as whether the code leaves the machine to an external provider, relative cost/latency, or whether the review is single-turn. Adequate but not rich beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action, scope, and deliverable in order; no filler, no repetition of the tool name or title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With nine parameters and no output schema, the description usefully sketches what comes back (severity ratings and suggested fixes), which compensates for the missing output schema. Remaining gaps are minor but real: no mention that code is sent to third-party AI providers, no guidance on size limits, and no differentiation from the sibling review-adjacent tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter is already documented in the schema, including provider enumeration, model ID format, temperature, and reasoning_effort. The description only reinforces that a provider can be swapped ('or any AI, via provider') and does not add syntax or constraints beyond that. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('review') and resource ('code') and enumerates the dimensions covered (bugs, security, performance, readability) plus the shape of the result (severity ratings, suggested fixes). This clearly separates it from generic siblings like chatgpt_ask or ai_ask, which are not review-specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb: use this when you want a code review. However, the description never says when to prefer this over chatgpt_ask, chatgpt_second_opinion, or ai_ask, nor does it state any preconditions (e.g. code size limits, one-shot vs. conversational). Guidance is inferable but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.