Skip to main content
Glama
marianfoo

SAP Documentation MCP Server

by marianfoo

search

Find SAP development documentation across ABAP, RAP, CAP, UI5, BTP, and AI sources, returning document IDs and snippets so you can fetch full content.

Instructions

SEARCH SAP DOCUMENTATION: search(query="search terms")

FUNCTION NAME: search

Unified search for SAP development documentation, including UI5, CAP, BTP services, Cloud SDK, AI, ABAP, and RAP. 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.

Additional SAP Docs sources (use these IDs with the sources filter): • btp-connectivity: Destinations, Cloud Connector, HTTP/RFC, and principal propagation. • cloud-sdk-python, cloud-sdk-ai-python: Python BTP and AI SDK reference and examples. • odata-vocabularies: SAP annotation terms and types for Fiori elements, CAP, and RAP. • btp-cloud-identity-services, btp-cloud-identity-integration: IAS/IPS, trust, and provisioning. • btp-integration-suite, btp-event-mesh: Integration flows, adapters, scripting, API Management, and events. • btp-job-scheduling-service, btp-cloud-logging: Scheduled jobs and observability. • btp-business-application-studio: Dev spaces, development, and troubleshooting. • btp-continuous-integration-and-delivery, btp-cloud-transport-management: Pipelines and transports. • sap-tutorials-ai, sap-tutorials-hana, sap-tutorials-integration: Curated official tutorials with prerequisites, code, and published source links. Use these for worked examples; use the SDK/product sources for reference details.

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 include the product and technical 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
kNoNumber of results to return. Default: 50.
queryYesSearch terms for SAP documentation, in ENGLISH (corpus is primarily English). Be specific and include the product and technical terms.
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.
sourcesNoOptional: specific source IDs to search. If not provided, searches all sources configured for the active profile.
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.
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
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.62
    • changedInput schema / properties / query / description
      Previous value: -"Search terms for ABAP/RAP documentation, in ENGLISH (corpus is primarily English). Be specific and use technical terms."New value: +"Search terms for SAP documentation, in ENGLISH (corpus is primarily English). Be specific and include the product and technical terms."
    • changedInput schema / properties / sources / description
      Previous value: -"Optional: specific source IDs to search. If not provided, searches all ABAP sources."New value: +"Optional: specific source IDs to search. If not provided, searches all sources configured for the active profile."
  2. Changed10 schema fields changedv0.3.50
    • addedInput schema / properties / abapFlavor
      Added value: +{
      +  "default": "auto",
      +  "description": "Filter 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.",
      +  "enum": [
      +    "standard",
      +    "cloud",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / includeOnline
      Added value: +{
      +  "default": true,
      +  "description": "Include 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.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / includeSamples
      Added value: +{
      +  "default": true,
      +  "description": "Include sample-heavy offline sources (cheat sheets, showcases, example repos). Default: true. Turn off if you want fewer code examples and more reference/guidance docs.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / k
      Added value: +{
      +  "default": 50,
      +  "description": "Number of results to return. Default: 50.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • addedInput schema / properties / product
      Added value: +{
      +  "description": "Optional 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.",
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Search terms using natural language. Be specific and include technical terms."New value: +"Search terms for ABAP/RAP documentation, in ENGLISH (corpus is primarily English). Be specific and use technical terms."
    • removedInput schema / properties / query / examples
      Removed value: -[
      -  "CAP binary data LargeBinary MediaType",
      -  "UI5 button properties",
      -  "wdi5 testing locators",
      -  "ABAP SELECT statements 7.58",
      -  "415 error CAP action parameter"
      -]
    • addedInput schema / properties / sources
      Added value: +{
      +  "description": "Optional: specific source IDs to search. If not provided, searches all ABAP sources.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Optional 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.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "results": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "id": {
      +            "type": "string"
      +          },
      +          "library_id": {
      +            "type": "string"
      +          },
      +          "metadata": {
      +            "additionalProperties": true,
      +            "type": "object"
      +          },
      +          "score": {
      +            "type": "number"
      +          },
      +          "snippet": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "topic": {
      +            "type": "string"
      +          },
      +          "url": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "title",
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  3. Addedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden. It discloses important traits such as offline vs. online source behavior, a 10-second per-source timeout, English-language ranking bias, and the fact that sample-heavy sources can dominate broad queries. It also clarifies that abapFlavor and product are query-domain signals rather than system flags, preventing misconfiguration.

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

Conciseness3/5

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

The description is well-structured with headings and front-loads the purpose, but it is overly verbose and duplicates content already present in the schema (e.g., parameter details and return format). The RETURNS section is unnecessary because an output schema exists, and the parameter descriptions could be shorter given the high schema coverage.

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?

For a complex tool with 8 parameters, many sources, and no annotations, the description is complete: it covers source types, online/offline behavior, parameter routing, typical workflow, and escalation. Nothing an agent needs to call it correctly is missing, even though some details are redundant with the schema.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already contains detailed parameter descriptions (including discovery instructions for product and version, and abapFlavor routing). The main description largely repeats this information in its PARAMETERS section without adding significant new meaning beyond the schema. Baseline 3 is appropriate.

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 states a specific verb (search) and resource (SAP development documentation), enumerating covered domains (UI5, CAP, BTP, ABAP, RAP). It explicitly distinguishes from the fetch tool ('then call fetch(id=...)') and from sap_community_search (escalation path), so an agent can identify its role 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?

The description gives explicit when-to-use guidance, including the typical workflow (search then fetch) and a clear escalation rule to sap_community_search when results are unhelpful. It also provides detailed conditions for toggling includeOnline, includeSamples, abapFlavor, product, and version, leaving no ambiguity about how to route queries.

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