Skip to main content
Glama

Review the prompts in code

lint_prompts
Read-onlyIdempotent

Find the prompts in source files (Python, JavaScript, TypeScript, YAML, JSON and prompt files) and review each for what breaks AI features in production: user input in a system prompt or with nothing around it, no rule that user text is data, code that parses the reply as JSON when the prompt never asks for JSON, a long fixed part after the changing part (so it cannot be cached), keys and personal data in prompts, and model ids that are not in the current catalog. Each finding has a line and a fix. Use it when writing or reviewing code that calls a model.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "lint_prompts"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoOr one file's contents.
pathNoIts path, when code is given.
filesNoThe files to review, up to 200.
formatNoAlso return SARIF 2.1.0 or a Markdown summary.json

Output Schema

NameRequiredDescriptionDefault
modelsYesModel ids in the code, and whether each is in the current catalog.
promptsYesEvery prompt found, with its findings.
summaryYes
findingsYesFindings for the code as a whole: keys, model ids.
catalog_checkedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: the exact classes of defect it looks for (unfenced user input, missing data-only rule, JSON parsed but never requested, uncacheable ordering, secrets, stale model ids) and that output carries a line and a suggested fix. It does not state what the default scan target is when nothing is passed, which is the one remaining behavioral gap.

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

Conciseness4/5

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

Front-loaded with the core action, and the long enumeration of checks is dense but earns its place by defining detection scope. The trailing "Each finding has a line and a fix" and the usage sentence are both doing work, though the check list could be tightened slightly without losing meaning.

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 a full output schema and rich annotations, the description need not explain return values, and it correctly focuses on what gets flagged. The notable omission is that all four parameters are optional, yet the description never says what is scanned when the call is made with no arguments (current working directory? whole repo?), which matters for a scanner.

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, and the description adds no per-parameter detail such as what happens when both code and files are supplied or the 200-file cap behavior. The file-extension list loosely mirrors the supported input set but does not map to any parameter. Baseline 3 is appropriate.

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?

States a specific verb and resource ("find the prompts in source files ... and review each") plus an explicit file-type scope (Python, JavaScript, TypeScript, YAML, JSON, prompt files). That repo-scanning scope separates it from siblings like get_prompt or grade_prompt, which operate on a prompt passed in rather than discovered in code.

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

Usage Guidelines4/5

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

Gives a concrete triggering condition: "Use it when writing or reviewing code that calls a model." That is a clear context for selection, but there are no exclusions and no sibling alternatives named (e.g., when a single prompt should be graded with grade_prompt instead of a codebase scan).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources