# lint

> Lint project. A project's problems: code, severity, item, message, hint.

Source: https://stuarty.com/docs/mcp/tools/lint/

A project's problems: code, severity, item, message, hint. Errors block export: run after edits, before export. Runs every rule, unlike an edit's lint block (lint_scope fast). preset: fit to an export preset over start..end.

## Behaviour

These are the annotations of the tool definition, the hints a client uses to decide whether to ask before a call. `lint` is listed by `tools/list`.

| Property | Value |
| --- | --- |
| Read only | yes |
| Destructive | no |
| Idempotent | yes |
| Reaches outside the workspace | no |

## Input

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `project_id` | `string` | yes | pattern `^prj_[0-9a-hjkmnp-tv-z]{10}$` |
| `timeline_id` | `string` | no | pattern `^prj_[0-9a-hjkmnp-tv-z]{10}$` |
| `severity` | `error`, `warning` | no | default `"warning"` |
| `cursor` | `string` | no |  |
| `limit` | `integer` | no | min 1; max 100; default `25` |
| `preset` | `string` | no |  |
| `start` | `string` | no |  |
| `end` | `string` | no |  |

## Output

A result has a text block, written for the model, and structured content with these members.

| Member | Type | Always present | Notes |
| --- | --- | --- | --- |
| `revision` | `integer` | yes |  |
| `errors` | `integer` | yes |  |
| `warnings` | `integer` | yes |  |
| `findings` | array of `object` | yes |  |
| `next_cursor` | `string` or `null` | no |  |

## Errors

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)
- [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found)

A call over HTTP without credentials fails with `E_UNAUTHORIZED`, and too many calls with `E_RATE_LIMITED`. Both are in the [error codes](/docs/reference/error-codes).

## Safety

- Read only. Errors block an export; warnings do not.

## Next steps

- [Connect a client](/docs/mcp/connect)
- [The MCP tools](/docs/mcp/tools)

**Ask the agent**

> Check the project for problems before I export.

**The call**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lint",
    "arguments": {
      "project_id": "prj_7k2m9x4q1b",
      "severity": "warning"
    }
  }
}
```

**The result**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "…"
      }
    ],
    "structuredContent": {
      "project_id": "prj_7k2m9x4q1b",
      "revision": 12,
      "errors": 0,
      "warnings": 0,
      "findings": [],
      "next_cursor": null
    }
  }
}
```

The values are illustrative. The text block holds the same result written for the model; its wording is left out here.
