Skip to main content
Glama
marianfoo

SAP Documentation MCP Server

search

Search offline and online ABAP/RAP documentation to find relevant document IDs, then fetch full content for detailed answers.

Instructions

SEARCH ABAP/RAP DOCUMENTATION: search(query="search terms")

FUNCTION NAME: search

Unified search for ABAP + RAP development documentation. It searches across curated OFFLINE sources (fast, deterministic) and can also include ONLINE sources (best-effort, 10s timeout per source) when enabled.

Use this to discover the best document IDs, then call fetch(id=...) to retrieve full content.

LANGUAGE: Query in ENGLISH — the corpus and ranking are primarily English; non-English queries return weaker results.

SOURCES OVERVIEW

OFFLINE sources (local FTS index; always searched unless filtered via sources): Reference & guidance (not sample-heavy): • abap-docs-standard (offline): Official ABAP Keyword Documentation for on‑premise systems (full syntax). Best for statement syntax + semantics. • abap-docs-cloud (offline): Official ABAP Keyword Documentation for ABAP Cloud/BTP (restricted syntax). Best for Steampunk/BTP constraints. • sap-styleguides (offline): SAP Clean ABAP Style Guide + best practices (includes translations; non‑English duplicates are filtered). • dsag-abap-leitfaden (offline): DSAG ABAP Leitfaden (German) with ABAP development guidelines and best practices. • btp-cloud-platform (offline): SAP Business Technology Platform documentation - concepts, getting started, development, extensions, administration, security. • sap-artificial-intelligence (offline): SAP AI Core and SAP AI Launchpad documentation.

Sample-heavy OFFLINE sources (controlled by includeSamples; great for implementation, can dominate broad queries): • abap-cheat-sheets (offline, samples): Many practical ABAP/RAP snippets; quick “how-to” reference. • abap-fiori-showcase (offline, samples): Annotation-driven RAP + OData V4 + Fiori Elements feature showcase. • abap-platform-rap-opensap (offline, samples): openSAP “Building Apps with RAP” course samples (ABAP/CDS). • cloud-abap-rap (offline, samples): ABAP Cloud + RAP example projects (ABAP/CDS). • abap-platform-reuse-services (offline, samples): RAP reuse services examples (number ranges, change documents, mail, Adobe Forms, ...).

OPTIONAL ONLINE SOURCES (when includeOnline=true): • sap-help (online): SAP Help Portal product documentation (official, broad scope). • sap-community (online): SAP Community blogs + Q&A + troubleshooting (practical, quality varies). • software-heroes (online): Software Heroes ABAP/RAP articles & tutorials (searched in EN+DE, deduplicated by URL; feed search is disabled).

NOTE ABOUT abapFlavor: • OFFLINE: filters the official ABAP Keyword Documentation libraries (abap-docs-standard vs abap-docs-cloud); other offline sources are kept. • ONLINE: when set EXPLICITLY to "standard"/"cloud", it ALSO scopes the SAP Help leg to the matching ABAP product (standard → ABAP Platform docs; cloud → ABAP environment docs), removing cross-product noise on conceptual ABAP queries. "auto" leaves SAP Help unscoped. • IMPORTANT — "standard"/"cloud" is a QUERY-DOMAIN signal ("this is an ABAP-LANGUAGE question"), NOT a system flag. Forcing it on a non-ABAP-language query scopes SAP Help to ABAP-language docs and buries the relevant content. Route by DOMAIN:

  • ABAP language/RAP/CDS → "standard" or "cloud".

  • FUNCTIONAL / configuration (Asset Accounting, Controlling, EWM ) → leave abapFlavor "auto" and pass the product param (e.g. "SAP_S4HANA_ON-PREMISE").

  • CAP / UI5 / Fiori → leave "auto". The OFFLINE corpus is the authoritative source for these; note the online SAP Help leg is NOT scoped for them (no abapFlavor/product fit yet), so it may still contribute some off-topic or low-value SAP Help hits.

PARAMETERS: • query (required): Search terms. Be specific and use technical ABAP/RAP terminology. • k (optional, default=50): Number of results to return. • includeOnline (optional, default=true): Keep this ON for best answers. Only set to false if online search is blocked/slow/unreliable in your environment OR you explicitly want OFFLINE-only sources. • includeSamples (optional, default=true): Includes sample-heavy offline sources (repos, showcases, cheat sheets). If results are flooded by examples and you want more conceptual/reference docs, set to false. Turn it on when you want implementation/code. • abapFlavor (optional, default="auto"): Filter by ABAP flavor:

  • "standard": Only Standard ABAP (on-premise, full syntax)

  • "cloud": Only ABAP Cloud (BTP, restricted syntax)

  • "auto": Detect from query (add "cloud" or "btp" for cloud, otherwise standard) • sources (optional): Restrict OFFLINE search to specific source IDs (does not disable online sources; use includeOnline for that). Example: ["abap-docs-standard", "sap-styleguides"]

RETURNS (JSON array of results, each containing): • id: Document identifier (use with fetch to get full content) • title: Document title • url: Link to documentation • snippet: Text excerpt from document • score: Relevance score (RRF-fused from multiple sources) • library_id: Source library identifier • metadata.source: Source ID (abap-docs-standard, sap-help, etc.) • metadata.sourceKind: "offline" | "sap_help" | "sap_community" | "software_heroes"

TYPICAL WORKFLOW:

  1. search(query="your ABAP/RAP question")

  2. fetch(id="result_id_from_step_1") to get full content

QUERY TIPS: • Be specific: "RAP behavior definition" not just "RAP" • Include ABAP keywords: "SELECT FOR ALL ENTRIES", "LOOP AT GROUP BY" • For ABAP Cloud: Add "cloud" or "btp" to query, or set abapFlavor="cloud" • For OFFLINE-only: Set includeOnline=false (use this mainly when online search does not work for you) • If results are too code-heavy: Set includeSamples=false • For implementation examples: Keep includeSamples=true

ESCALATION: If search returns no useful results (especially for specific error messages, niche runtime issues, or workaround patterns), try the dedicated sap_community_search tool which searches SAP Community blogs and Q&A directly and returns full post content for the top matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch terms for ABAP/RAP documentation, in ENGLISH (corpus is primarily English). Be specific and use technical terms.
kNoNumber of results to return. Default: 50.
includeOnlineNoInclude online sources (SAP Help, SAP Community, Software Heroes). Default: true. Only turn off if online search is blocked/slow/unreliable or you explicitly want offline-only sources.
includeSamplesNoInclude sample-heavy offline sources (cheat sheets, showcases, example repos). Default: true. Turn off if you want fewer code examples and more reference/guidance docs.
abapFlavorNoFilter by ABAP flavor: 'standard' (on-premise), 'cloud' (BTP), or 'auto' (detect from query). Default: auto. Offline: picks the abap-docs library. Online: an EXPLICIT 'standard'/'cloud' also scopes the SAP Help leg to the matching ABAP product, removing cross-product noise. QUERY-DOMAIN signal ('this is an ABAP-language question'), NOT a system flag. Route by domain: ABAP language → 'standard'/'cloud'; FUNCTIONAL/config → 'auto' + the `product` param (e.g. SAP_S4HANA_ON-PREMISE); CAP/UI5/Fiori → 'auto' (offline corpus is authoritative; the online leg stays unscoped for these). Forcing 'standard' on a non-ABAP query buries the relevant docs.auto
sourcesNoOptional: specific source IDs to search. If not provided, searches all ABAP sources.
versionNoOptional SAP release filter, applied ONLY to online SAP Help (help.sap.com) — offline docs are unaffected. Omit it for the latest content (the right default for most queries). To pin an older release, copy a result's `versionId` value EXACTLY and pass it back here — it is case-sensitive and its format varies by product (e.g. '2025.001', '2.0.08', '10.0', '2211', 'Cloud', '2026_06'). Discover valid values in one step: run the same search WITHOUT version first; every result shows its `versionId`. Never invent, reformat, or guess the token (a bare year like '2025' is usually a different release). If a version matches nothing, the latest results are returned instead, so no results are lost.
productNoOptional SAP Help product-id scope, applied ONLY to the online SAP Help leg (offline unaffected). Routes the online query to ONE product's docs — use it for FUNCTIONAL/configuration questions that `abapFlavor` cannot express (e.g. 'SAP_S4HANA_ON-PREMISE' for Asset Accounting, Grants, sales customizing). Takes precedence over the abapFlavor auto-mapping. DISCOVER valid values exactly like `version`: run the search once WITHOUT product and copy a result's `metadata.productId` EXACTLY — that is the scope facet, NOT `metadata.product`, which is the human display label (e.g. 'SAP S/4HANA') and will NOT filter. Never invent a slug (e.g. 'ABAP_PLATFORM' is wrong; the real facet is 'ABAP_PLATFORM_NEW'). An unknown product safely falls back to unscoped, so nothing is lost.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes
Behavior5/5

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

No annotations provided, so the description fully discloses behavior: it searches offline (fast, deterministic) and online (best-effort, 10s timeout per source), the language sensitivity (English preferred), how `abapFlavor` affects offline/online legs, and how `version`/`product` parameters only apply to online SAP Help. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with sections, bullet points, and clear formatting. Every sentence earns its place by providing critical guidance. It is front-loaded with the function signature and overall purpose, and the structure makes it easy to navigate. For a complex tool with 8 parameters and many sources, this level of detail is appropriate.

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?

Given the tool's complexity (8 parameters, multiple source types, output schema), the description covers all aspects: purpose, parameters with detailed usage, return format, workflow, query tips, escalation, and relationship to siblings. The output schema is documented, and the description explains how to interpret results (e.g., use `id` with `fetch`). Complete.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds substantial context beyond the schema: for `abapFlavor`, it explains offline/online behavior and routing advice; for `sources`, it lists and characterizes each source; for `includeOnline`/`includeSamples`, it gives conditions to disable; for `version` and `product`, it explains how to discover valid values. This significantly aids agent understanding.

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 description clearly identifies the tool as a unified search for ABAP/RAP development documentation, searching offline and online sources. It distinguishes its purpose from siblings like `fetch` (for retrieving content) and `sap_community_search` (escalation for niche queries). The verb 'search' is specific and the resource is well-defined.

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?

Provides explicit guidance on when to use this tool versus alternatives, including when to turn off `includeOnline`, how to set `abapFlavor` based on query domain, and when to use `sap_community_search` for escalation. Also gives query tips and a typical workflow. This is comprehensive and actionable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marianfoo/mcp-sap-docs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server