Skip to main content
Glama

SAPLint

Lint and auto-fix ABAP/CDS source locally with abaplint rules, list active rules, and format code via SAP ADT; selects cloud or on-prem rules by system type.

Instructions

Run local abaplint rules on ABAP/CDS source (auto-selects cloud or on-prem rules by system type). Actions:

  • "lint": check source (errors+warnings) for ABAP (PROG/CLAS/INTF/FUNC) and CDS (DDLS).

  • "lint_and_fix": lint + auto-fix fixable issues (keyword case, obsolete statements); returns fixed source.

  • "list_rules": list rules + current config (no source).

  • "format": pretty-print via SAP's ADT formatter (needs source).

  • "get_formatter_settings" / "set_formatter_settings": read/update the system's global PrettyPrinter (indentation bool, style keywordUpper|keywordLower|keywordAuto|none; set is blocked read-only). lint/lint_and_fix/list_rules run locally; format/*_formatter_settings call SAP. Syntax: SAPRead(type="SYNTAX"); ATC/unit tests: SAPDiagnose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoObject name (used for filename detection)
rulesNoRule overrides: { "rule_name": false } to disable, { "rule_name": { "severity": "Warning" } } to configure. Overrides system defaults.
styleNoPrettyPrinter: keyword casing (for set_formatter_settings)
actionYesCheck type
sourceNoABAP or CDS source code to lint/format (not needed for list_rules/get_formatter_settings)
indentationNoPrettyPrinter: indent source (for set_formatter_settings)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.2
    • addedInput schema / additionalProperties
      Added value: +false
  2. Addedv0.9.6
  3. Removedv0.9.3
  4. Changed4 schema fields changedv0.7.2
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "lint",
      -  "lint_and_fix",
      -  "list_rules"
      -]New value: +[
      +  "lint",
      +  "lint_and_fix",
      +  "list_rules",
      +  "format",
      +  "get_formatter_settings",
      +  "set_formatter_settings"
      +]
    • addedInput schema / properties / indentation
      Added value: +{
      +  "description": "PrettyPrinter: indent source (for set_formatter_settings)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / source / description
      Previous value: -"ABAP source code to lint (not needed for list_rules)"New value: +"ABAP or CDS source code to lint/format (not needed for list_rules/get_formatter_settings)"
    • addedInput schema / properties / style
      Added value: +{
      +  "description": "PrettyPrinter: keyword casing (for set_formatter_settings)",
      +  "enum": [
      +    "keywordUpper",
      +    "keywordLower",
      +    "keywordAuto",
      +    "none"
      +  ],
      +  "type": "string"
      +}
  5. First observedv0.6.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false, which is ambiguous across six actions. The description resolves that by disclosing which actions are local vs remote calls, that lint_and_fix returns fixed source, and that set_formatter_settings is blocked in read-only mode. It stops short of describing fix reversibility or the shape of diagnostics, so it adds real value but not full coverage.

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?

Purpose is front-loaded, then the six actions are bulleted with one-line semantics each, followed by the local/SAP split and sibling routing. Dense and scannable, though the bullet list is long enough to border on enumeration-heavy rather than prose-minimal.

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?

For a six-action, nested-object tool with no output schema, the description covers action semantics, parameter applicability, and sibling alternatives. It mentions that lint returns errors+warnings and that lint_and_fix returns fixed source, but says nothing about diagnostic formatting for lint or behavior on unparseable source.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description goes further by mapping parameters to actions (source required for lint/format, not for list_rules/get_formatter_settings) and restating the formatter fields (indentation bool, style casings). It clarifies applicability rather than merely repeating schema text.

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 opening line states a specific verb and resource ('Run local abaplint rules on ABAP/CDS source') plus a scope qualifier (auto-selects cloud or on-prem rules by system type). Each action is enumerated with its exact function, so an agent can distinguish lint vs format vs formatter-settings without opening the schema.

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

Usage Guidelines5/5

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

Routing is explicit: lint/lint_and_fix/list_rules run locally, format and formatter-settings call SAP, and 'set is blocked read-only'. It also names the correct alternatives for adjacent needs ('Syntax: SAPRead(type="SYNTAX"); ATC/unit tests: SAPDiagnose'), leaving nothing to inference.

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