Skip to main content
Glama

Get the AGENTS.md rules block for an ABAP repo

get_abap_agent_rules
Read-onlyIdempotent

Generate ABAP coding-agent rules for AGENTS.md or CLAUDE.md, covering lint-before-commit, Cloud readiness gates, released-API discipline, scaffolding, and offline test loops.

Instructions

Generate the ABAP section of a repository's AGENTS.md / CLAUDE.md: the lint-before-commit rule, the ABAP Cloud readiness gate, released-API discipline, scaffold-first, the offline unit-test loop, and — when SAP's official ADT MCP server is paired — the composed read → offline-check → edit → check → activate → test loop with the allow-list level it needs. Use this when you set up a new ABAP repo for agentic development or want a team's coding-agent rules to reference the abap-mcp tools consistently. It does not write the file (paste the returned markdown yourself), does not read the workspace, and is not a substitute for the project's own conventions — it encodes the tool contract, nothing project-specific beyond the parameters you pass. Example: { "target": "Cloud", "pairedWith": ["sap-adt-mcp"], "runEnabled": true }.

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": "get_abap_agent_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetNo"Cloud" (default) for ABAP Cloud / Steampunk repos, "classic" for on-prem baselines that still migrate.Cloud
editionNoReleased-API edition the readiness gate should quote: "s4hc" (S/4HANA Cloud Public Edition), "btp" (BTP ABAP Environment), "pce" (Private Cloud Edition).s4hc
pairedWithNoOnline ADT MCP servers the agent can also use: "sap-adt-mcp" (SAP official, ships with ADT), "abap-adt-mcp" (community), or "none".
runEnabledNoTrue when run_abap_unit is enabled (ABAP_MCP_ENABLE_RUN=1) so the rules prescribe the offline test loop.
packagePrefixNoCustomer namespace/prefix for new objects, e.g. "Z", "Y" or "/ACME/".Z

Output Schema

NameRequiredDescriptionDefault
markdownYesThe AGENTS.md section, ready to paste.
ruleCountYesNumber of rules emitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description adds real value beyond them by clarifying the output-handling contract (you must paste the returned markdown yourself) and that no workspace read occurs. It stops short of describing size or variability of the returned block, which would have made it fully self-sufficient.

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 verb and artifact, and every sentence contributes either scope, a non-goal, or an example. The middle list of rule blocks is dense and slightly overstuffed, but it is informative rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is unnecessary, and the description covers purpose, trigger, non-behaviors, parameter effects, and a worked example. For a 5-parameter, fully-defaulted, idempotent read-only generator, an agent has everything needed to call it correctly.

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 coverage is 100%, so baseline is 3. The description earns above that by explaining what parameters change in the output: pairedWith determines whether the composed read → offline-check → edit → check → activate → test loop and its allow-list level are included, and runEnabled switches on the offline unit-test loop. The example object also shows typical combinations, adding meaning beyond the enum descriptions.

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 concrete verb and artifact: generate the ABAP section of an AGENTS.md/CLAUDE.md, and enumerates the rule blocks it emits (lint-before-commit, Cloud readiness gate, released-API discipline, scaffold-first, offline test loop, composed ADT loop). This clearly separates it from siblings like list_abap_rules or explain_abap_rule, which inspect rules rather than authoring agent instructions.

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?

Gives an explicit trigger ('when you set up a new ABAP repo for agentic development or want a team's coding-agent rules to reference the abap-mcp tools') and explicit exclusions: it does not write the file, does not read the workspace, and is not a substitute for project conventions. The boundary against project-specific convention tooling is stated, not inferred.

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