Skip to content

MCP tools

lint

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

Last updated:

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.

PropertyValue
Read onlyyes
Destructiveno
Idempotentyes
Reaches outside the workspaceno

Input#

ArgumentTypeRequiredNotes
project_idstringyespattern ^prj_[0-9a-hjkmnp-tv-z]{10}$
timeline_idstringnopattern ^prj_[0-9a-hjkmnp-tv-z]{10}$
severityerror, warningnodefault "warning"
cursorstringno
limitintegernomin 1; max 100; default 25
presetstringno
startstringno
endstringno

Output#

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

MemberTypeAlways presentNotes
revisionintegeryes
errorsintegeryes
warningsintegeryes
findingsarray of objectyes
next_cursorstring or nullno

Errors#

A call over HTTP without credentials fails with E_UNAUTHORIZED, and too many calls with E_RATE_LIMITED. Both are in the error codes.

Safety#

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

Next steps#

Ask the agent

Check the project for problems before I export.

The call

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

The result

result
{
  "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.