Skip to main content
Glama

SAPSearch

Read-only

Search ABAP object names, exact TADIR entries, or source code across SAP packages to find objects, resolve names, or locate code strings.

Instructions

Search for ABAP objects, exact object-directory entries, or source code. Modes:

  1. Object search (default): name pattern with wildcards (*); returns type, name, package, description, ADT URI.

  2. TADIR lookup (searchType="tadir_lookup"): exact cross-package lookup of one or more names (prefer over long SAPQuery TADIR IN-lists).

  3. Source code search (searchType="source_code"): full-text search across source (SAP_BASIS ≥ 7.51). Tips: BOR objects appear as SOBJ; the uri field feeds SAPNavigate, objectType feeds SAPRead/SAPWrite/SAPActivate. Searches object NAMES only — for field names use SAPRead(type='DDLS', include='elements') or SAPQuery on DD03L.

Input Schema

NameRequiredDescriptionDefault
namesNoFor tadir_lookup: exact object names to resolve across packages. Prefer this over long SAPQuery TADIR IN-lists.
queryNoSearch pattern. For object search: name pattern with wildcards (e.g., ZCL_ORDER*, Z*TEST*). For tadir_lookup: exact name or comma/whitespace-separated names. For source_code search: text string to find in source (e.g., cl_lsapi_manager, CALL FUNCTION).
sourceNoFor tadir_lookup only: data source for the lookup. "adt" (default) uses the ADT info-system endpoint — workbench-resolvable objects only. "db" issues SQL against table TADIR — also surfaces orphan/ghost rows from aborted create-delete cycles (requires sql scope and SAP_ALLOW_FREE_SQL=true). "both" runs both paths and adds a "splitBrain" array listing names where the two sources disagree, plus a "warnings" array explaining each divergence (requires sql scope).
maxResultsNoMaximum results (default 100 for object, 50 for source_code)
objectTypeNoObject search: SAP-side type filter before the result limit (e.g., UIAC, CLAS, CLAS/OC). Source search: type filter (e.g., PROG, CLAS, FUNC). For tadir_lookup: single type filter; use objectTypes for multiple.
searchTypeNoSearch mode: "object" (default) searches by object name, "source_code" searches within ABAP source code, "tadir_lookup" does exact cross-package object lookup.
objectTypesNoFor tadir_lookup: optional ADT/TADIR type filters (e.g., TABL, DDLS, BDEF, SRVB, CLAS/OC).
packageNameNoFor source_code search: filter by package name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.6.0
    • changedInput schema / properties / maxResults / description
      Previous value: -"Maximum results (default 100)"New value: +"Maximum results (default 100 for object, 50 for source_code)"
    • addedInput schema / properties / packageName
      Added value: +{
      +  "description": "For source_code search: filter by package name",
      +  "type": "string"
      +}
    • changedInput schema / properties / query / description
      Previous value: -"Search pattern for object search, or comma/whitespace-separated names for tadir_lookup."New value: +"Search pattern. For object search: name pattern with wildcards (e.g., ZCL_ORDER*, Z*TEST*). For tadir_lookup: exact name or comma/whitespace-separated names. For source_code search: text string to find in source (e.g., cl_lsapi_manager, CALL FUNCTION)."
    • changedInput schema / properties / searchType / description
      Previous value: -"Search mode: \"object\" (default) searches by object name, \"tadir_lookup\" does exact cross-package object lookup."New value: +"Search mode: \"object\" (default) searches by object name, \"source_code\" searches within ABAP source code, \"tadir_lookup\" does exact cross-package object lookup."
    • changedInput schema / properties / searchType / enum
      Previous value: -[
      -  "object",
      -  "tadir_lookup"
      -]New value: +[
      +  "object",
      +  "source_code",
      +  "tadir_lookup"
      +]
  2. Changed2 schema fields changedv1.3.0
    • changedInput schema / properties / objectType / description
      Previous value: -"For source_code search: filter by object type (e.g., PROG, CLAS, FUNC). For tadir_lookup: single type filter; use objectTypes for multiple."New value: +"Object search: SAP-side type filter before the result limit (e.g., UIAC, CLAS, CLAS/OC). Source search: type filter (e.g., PROG, CLAS, FUNC). For tadir_lookup: single type filter; use objectTypes for multiple."
    • addedInput schema / properties / objectType / maxLength
      Added value: +64
  3. Changed1 schema field changedv1.0.2
    • addedInput schema / additionalProperties
      Added value: +false
  4. Addedv0.9.6
  5. Removedv0.9.3
  6. First observedv0.6.4

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds real prerequisite context the annotations cannot: source_code search requires SAP_BASIS >= 7.51, and the 'db' source needs sql scope plus SAP_ALLOW_FREE_SQL=true. It also discloses the splitBrain/warnings output for 'both'. Minor gap: no pagination or result-shape detail beyond the per-mode return fields.

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 default mode is front-loaded, the numbered mode list is scannable, and the Tips section is culled to actionable pointers. No sentence is filler despite the density.

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 an 8-parameter, zero-required read tool with no output schema, the description covers all three modes, prerequisites, return fields, and hand-off to sibling tools. Nothing material to correct invocation is missing.

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 adds mode-to-parameter mapping (which params apply to object vs tadir_lookup vs source_code) and cross-tool flow guidance (uri feeds SAPNavigate, objectType feeds SAPRead/SAPWrite/SAPActivate) that the schema alone does not convey.

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 specific verb+resource (search ABAP objects, TADIR entries, or source code) and enumerates three distinct modes with what each returns (type, name, package, description, ADT URI). It also names sibling tools (SAPNavigate, SAPRead, SAPWrite, SAPActivate, SAPQuery) so an agent can differentiate it from the rest of the family.

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?

Explicitly routes the agent: 'prefer over long SAPQuery TADIR IN-lists' for tadir_lookup, and a Tips section directs field-name searches away to SAPRead(DDLS, include='elements') or SAPQuery on DD03L. Both when-to-use and when-not-to-use are covered.

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