Skip to main content
Glama

GetWhereUsed

Finds every ABAP object that uses, calls, or references a class, function module, table, or other repository object, helping you assess dependencies and impact before changes.

Instructions

[read-only] Reads where an ABAP class (CLAS), function module (FUGR), table (TABL) or other repository object is used: every object that uses, calls or references it. Runs on an ABAP session of its own. By default the run goes on after the call, and its result comes back under the run_handle the call gives; with background false the result comes back in the call.

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

Input Schema

NameRequiredDescriptionDefault
detailNoHow much of the answer to return: "terse" (default) what a next call needs: the identifiers and a short description; "medium" every item the tool read, with its main properties; "full" the tool's whole answer; "raw" what SAP sent.terse
objectsNoSeveral objects, read together (give this or object_name and object_type). The type filters apply to every object.
containerNoWith object_type PROG/PX, required: whose text elements they are, program or function_group. Taken by PROG/PX alone.
in_objectNoOne object that uses it, as a where-used answer names it (type and name): the answer is then that object's usages only, each with its method or section and the source line it is on. Call once for each using object whose code lines are wanted; without it the answer is where each usage is, with no code lines.
backgroundNoDefault true: the read runs in the background on an ABAP session of its own and the call answers at once with a run_handle; GetBackgroundRun answers its result once, and DiscardBackgroundRun cancels it while it runs. false: the call answers the result itself.
object_nameNoName of the ABAP object (with object_type; or give objects). For function modules the name MUST be in the form 'GROUP|FM_NAME' (function group name, pipe, function module name).
object_typeNoType of the ABAP object: an ADT type code (either case), or a name standing for one (in brackets after it): CLAS/OC (class), INTF/OI (interface), PROG/P (program), PROG/I (include), FUGR/F (functiongroup), FUGR/FF (function, functionmodule, function_module, func), DEVC/K (package), DDLS/DF (view), VIEW/DV (dbview), TABL/DT (table), TABL/DS (structure, stru), TTYP/DA, DOMA/DD (domain), DTEL/DE (dataelement), DCLS/DL, BDEF/BDO, DDLX/EX, SRVD/SRV, SRVB/SVB, DSFD/SCF, DSFI/SFI, XSLT/VT, MSAG/N, FTG2/FT, AUTH, ENHO/XHH, ENHO/XHB, ENHS/XSB, PROG/PX. A function module is named as object_name says. PROG/PX is a program's or a function group's text elements; container says which. A name is written in lower case: view is a CDS view (DDLS/DF). A value in upper case is a code, a main type or a search name of the system's object types list first, so VIEW is the dictionary views (VIEW/DV); it is a name only when it is none of these (CLASS is class). A main type, the part of a code before its slash, stands for its code when exactly one listed code has it. In upper case, a search name of the system's object types list stands for the listed code its list item has (e.g. STRU for TABL/DS).
disable_typesNoRemove these ADT object types from the default scope, keeping the rest (e.g. ['CLAS/OC'] to drop class usages). Applied on top of the default scope or of enable_only_types/enable_all_types.
enable_all_typesNoIf true, expands the scope to all available object types (Eclipse 'select all' behavior) by flipping every isSelected flag in the scope XML. Default: false (SAP default scope). Note: on large systems this can make the search significantly slower.
enable_only_typesNoRestrict the search to ONLY these ADT object types (e.g. ['TABL/DS','TABL/DT'] for structures, ['DDLS/DF'] for CDS sources). SAP applies the selection server-side, so unwanted types (e.g. hundreds of CLAS/OC) are never searched nor returned — use this instead of enable_all_types to avoid huge result sets. Values must be object-type codes from THIS object's where-used scope (the searchable categories, e.g. 'CLAS/OC','INTF/OI','FUGR/FF','DDLS/DF', not result-row codes like 'FUGR/F'). If any value is not searchable for the object the call returns an error listing the supported types — it never falls back to the unfiltered default set. Takes precedence over enable_all_types.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / background
      Added value: +{
      +  "description": "Default true: the read runs in the background on an ABAP session of its own and the call answers at once with a run_handle; GetBackgroundRun answers its result once, and DiscardBackgroundRun cancels it while it runs. false: the call answers the result itself.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / container
      Added value: +{
      +  "description": "With object_type PROG/PX, required: whose text elements they are, program or function_group. Taken by PROG/PX alone.",
      +  "enum": [
      +    "program",
      +    "function_group"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "terse",
      +  "description": "How much of the answer to return: \"terse\" (default) what a next call needs: the identifiers and a short description; \"medium\" every item the tool read, with its main properties; \"full\" the tool's whole answer; \"raw\" what SAP sent.",
      +  "enum": [
      +    "terse",
      +    "medium",
      +    "full",
      +    "raw"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / in_object
      Added value: +{
      +  "description": "One object that uses it, as a where-used answer names it (type and name): the answer is then that object's usages only, each with its method or section and the source line it is on. Call once for each using object whose code lines are wanted; without it the answer is where each usage is, with no code lines.",
      +  "properties": {
      +    "object_name": {
      +      "description": "Its name",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "object_type": {
      +      "description": "Its type as the where-used answer names it, e.g. CLAS/OC, PROG/P, FUGR/F",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "object_type",
      +    "object_name"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / object_type / description
      Previous value: -"Type of the ABAP object. Case-insensitive. Accepts either a human alias or an ADT type code. Supported values: 'class' / 'clas/oc', 'interface' / 'intf/if', 'program' / 'prog/p', 'include', 'function' / 'functiongroup' / 'fugr' (function group), 'functionmodule' / 'function_module' / 'fugr/ff' (function module — see object_name format), 'package' / 'devc/k', 'table' / 'tabl/dt', 'structure' / 'stru/dt', 'domain' / 'doma/dd', 'dataelement' / 'dtel', 'view' / 'ddls/df' (CDS DDL source)."New value: +"Type of the ABAP object: an ADT type code (either case), or a name standing for one (in brackets after it): CLAS/OC (class), INTF/OI (interface), PROG/P (program), PROG/I (include), FUGR/F (functiongroup), FUGR/FF (function, functionmodule, function_module, func), DEVC/K (package), DDLS/DF (view), VIEW/DV (dbview), TABL/DT (table), TABL/DS (structure, stru), TTYP/DA, DOMA/DD (domain), DTEL/DE (dataelement), DCLS/DL, BDEF/BDO, DDLX/EX, SRVD/SRV, SRVB/SVB, DSFD/SCF, DSFI/SFI, XSLT/VT, MSAG/N, FTG2/FT, AUTH, ENHO/XHH, ENHO/XHB, ENHS/XSB, PROG/PX. A function module is named as object_name says. PROG/PX is a program's or a function group's text elements; container says which. A name is written in lower case: view is a CDS view (DDLS/DF). A value in upper case is a code, a main type or a search name of the system's object types list first, so VIEW is the dictionary views (VIEW/DV); it is a name only when it is none of these (CLASS is class). A main type, the part of a code before its slash, stands for its code when exactly one listed code has it. In upper case, a search name of the system's object types list stands for the listed code its list item has (e.g. STRU for TABL/DS)."
    • addedInput schema / properties / objects / items / properties / container
      Added value: +{
      +  "description": "With object_type PROG/PX, required: whose text elements they are, program or function_group. Taken by PROG/PX alone.",
      +  "enum": [
      +    "program",
      +    "function_group"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / timeout
      Removed value: -{
      -  "description": "Seconds to wait for the answer: a whole number, at least 1, no default — without it the call waits until SAP answers. When it passes, the read is cancelled (its ABAP session is logged off) and the call answers that nothing was changed. Set it below your MCP client's request limit — the TypeScript SDK's client cancels at 60 s; a cancel does nothing to SAP.",
      -  "maximum": 2147483,
      -  "minimum": 1,
      -  "type": "integer"
      -}
  2. Changed4 schema fields changedv20.1.0
    • changedInput schema / properties / object_name / description
      Previous value: -"Name of the ABAP object. For function modules the name MUST be in the form 'GROUP|FM_NAME' (function group name, pipe, function module name)."New value: +"Name of the ABAP object (with object_type; or give objects). For function modules the name MUST be in the form 'GROUP|FM_NAME' (function group name, pipe, function module name)."
    • addedInput schema / properties / objects
      Added value: +{
      +  "description": "Several objects, read together (give this or object_name and object_type). The type filters apply to every object.",
      +  "items": {
      +    "properties": {
      +      "object_name": {
      +        "description": "Name of the ABAP object; a function module as 'GROUP|FM_NAME'",
      +        "type": "string"
      +      },
      +      "object_type": {
      +        "description": "Type of the ABAP object, as object_type takes it",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "object_name",
      +      "object_type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / timeout
      Added value: +{
      +  "description": "Seconds to wait for the answer: a whole number, at least 1, no default — without it the call waits until SAP answers. When it passes, the read is cancelled (its ABAP session is logged off) and the call answers that nothing was changed. Set it below your MCP client's request limit — the TypeScript SDK's client cancels at 60 s; a cancel does nothing to SAP.",
      +  "maximum": 2147483,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "object_name",
      -  "object_type"
      -]
  3. Changed1 schema field changedv16.0.0
    • changedInput schema / properties / object_type / description
      Previous value: -"Type of the ABAP object. Case-insensitive. Accepts either a human alias or an ADT type code. Supported values: 'class' / 'clas/oc', 'interface' / 'intf/if', 'program' / 'prog/p', 'include', 'function' / 'functiongroup' / 'fugr' (function group), 'functionmodule' / 'function_module' / 'fugr/ff' (function module — see object_name format), 'package' / 'devc/k', 'table' / 'tabl/dt', 'structure' / 'stru/dt', 'domain' / 'doma/dd', 'dataelement' / 'dtel', 'view' / 'ddls/df' (CDS DDL source only — classic DDIC views are not supported). Any other value throws 'Unsupported object type'."New value: +"Type of the ABAP object. Case-insensitive. Accepts either a human alias or an ADT type code. Supported values: 'class' / 'clas/oc', 'interface' / 'intf/if', 'program' / 'prog/p', 'include', 'function' / 'functiongroup' / 'fugr' (function group), 'functionmodule' / 'function_module' / 'fugr/ff' (function module — see object_name format), 'package' / 'devc/k', 'table' / 'tabl/dt', 'structure' / 'stru/dt', 'domain' / 'doma/dd', 'dataelement' / 'dtel', 'view' / 'ddls/df' (CDS DDL source)."
  4. Changed2 schema fields changedv8.1.0
    • addedInput schema / properties / disable_types
      Added value: +{
      +  "description": "Remove these ADT object types from the default scope, keeping the rest (e.g. ['CLAS/OC'] to drop class usages). Applied on top of the default scope or of enable_only_types/enable_all_types.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / enable_only_types
      Added value: +{
      +  "description": "Restrict the search to ONLY these ADT object types (e.g. ['TABL/DS','TABL/DT'] for structures, ['DDLS/DF'] for CDS sources). SAP applies the selection server-side, so unwanted types (e.g. hundreds of CLAS/OC) are never searched nor returned — use this instead of enable_all_types to avoid huge result sets. Values must be object-type codes from THIS object's where-used scope (the searchable categories, e.g. 'CLAS/OC','INTF/OI','FUGR/FF','DDLS/DF', not result-row codes like 'FUGR/F'). If any value is not searchable for the object the call returns an error listing the supported types — it never falls back to the unfiltered default set. Takes precedence over enable_all_types.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. Changed3 schema fields changedv6.11.0
    • changedInput schema / properties / enable_all_types / description
      Previous value: -"If true, searches in all available object types (Eclipse 'select all' behavior). Default: false (uses SAP default scope)"New value: +"If true, expands the scope to all available object types (Eclipse 'select all' behavior) by flipping every isSelected flag in the scope XML. Default: false (SAP default scope). Note: on large systems this can make the search significantly slower."
    • changedInput schema / properties / object_name / description
      Previous value: -"Name of the ABAP object"New value: +"Name of the ABAP object. For function modules the name MUST be in the form 'GROUP|FM_NAME' (function group name, pipe, function module name)."
    • changedInput schema / properties / object_type / description
      Previous value: -"Type of the ABAP object (class, interface, program, table, etc.)"New value: +"Type of the ABAP object. Case-insensitive. Accepts either a human alias or an ADT type code. Supported values: 'class' / 'clas/oc', 'interface' / 'intf/if', 'program' / 'prog/p', 'include', 'function' / 'functiongroup' / 'fugr' (function group), 'functionmodule' / 'function_module' / 'fugr/ff' (function module — see object_name format), 'package' / 'devc/k', 'table' / 'tabl/dt', 'structure' / 'stru/dt', 'domain' / 'doma/dd', 'dataelement' / 'dtel', 'view' / 'ddls/df' (CDS DDL source only — classic DDIC views are not supported). Any other value throws 'Unsupported object type'."
  6. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and discloses the key behavioral model: read-only, execution on a dedicated ABAP session, background default true returning a run_handle, retrieval via GetBackgroundRun, cancellation via DiscardBackgroundRun, and inline results when background=false. It does not mention the default type scope or that unfiltered searches can return very large result sets, which is a meaningful omission for a where-used search.

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?

Minimal but three sentences: read-only marker and purpose first, then execution model, then the async-vs-inline outcome. There is slight repetition between "Runs on an ABAP session of its own" and the background sentence, but every sentence carries decision-relevant information and nothing is padded.

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

Completeness3/5

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

For a 10-parameter tool with nested objects and no output schema or annotations, the description adequately covers the async execution contract but says nothing about what a result contains beyond "every object that uses..." and nothing about default scope or result size, both central to calling it well. The parameter-level documentation compensates, but the description alone is only minimally complete.

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% across 10 parameters, so the schema already documents detail, objects, in_object, container, and the type-scope controls thoroughly. The description adds only the background/run_handle flow, which the background parameter description also covers, and says nothing about the scope-filtering parameters that most affect results. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

A specific verb and resource: "Reads where an ABAP class (CLAS), function module (FUGR), table (TABL) or other repository object is used: every object that uses, calls or references it." It makes clear this is a reverse-reference lookup rather than an object reader, which is inherently distinguishable from the Get* siblings, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the phrase "every object that uses, calls or references it" tells an agent the situation it fits, but there is no explicit when-to-use, no exclusion, and no named alternative such as the Get* tools that read an object's own definition. The only routing guidance (call in_object once per using object for code lines) lives in the schema, not the description.

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

Deploy Server

Other Tools