Review the prompts in code
lint_promptsFind 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
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Or one file's contents. | |
| path | No | Its path, when code is given. | |
| files | No | The files to review, up to 200. | |
| format | No | Also return SARIF 2.1.0 or a Markdown summary. | json |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| models | Yes | Model ids in the code, and whether each is in the current catalog. | |
| prompts | Yes | Every prompt found, with its findings. | |
| summary | Yes | ||
| findings | Yes | Findings for the code as a whole: keys, model ids. | |
| catalog_checked | Yes |