Skip to main content
Glama
ethanhan2014

SAP ADT MCP Server

by ethanhan2014

get_function_group

Retrieve ABAP function group source code from SAP system by specifying the function group name and optional system ID.

Instructions

Fetch ABAP function group source code from SAP system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFunction group name (e.g. SVAT)
system_idNoSAP system ID (e.g. DEV). Omit to use default system.

Implementation Reference

  • Registration of the get_function_group tool in the ListToolsRequestSchema handler, defining its name, description, and input schema.
    {
      name: "get_function_group",
      description: "Fetch ABAP function group source code from SAP system",
      inputSchema: {
        type: "object" as const,
        properties: { name: { type: "string", description: "Function group name (e.g. SVAT)" }, ...SYSTEM_ID_PROP },
        required: ["name"],
      },
    },
  • Handler implementation for the get_function_group tool in the CallToolRequestSchema handler. Parses the 'name' argument, constructs the ADT URI for function groups, and calls client.getSource to fetch the source code.
    case "get_function_group": {
      const { name: fgName } = NameSchema.parse(args);
      const source = await client.getSource(
        `/sap/bc/adt/functions/groups/${encodeURIComponent(fgName.toUpperCase())}/source/main`
      );
      return { content: [{ type: "text", text: source }] };
    }
  • The NameSchema used by get_function_group for validation (validates the 'name' parameter as a string).
    const NameSchema = z.object({ name: z.string() });
    const FunctionModuleSchema = z.object({
      function_group: z.string(),
      function_name: z.string(),
Behavior3/5

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

With no annotations, the description carries the full burden. It accurately describes a read operation ('Fetch'), but does not disclose any potential side effects, authorization needs, or performance considerations. The description is adequate but minimal.

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 a single sentence with no wasted words. It is front-loaded with the core action.

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

Completeness2/5

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

No output schema is provided, yet the description does not specify the format of the returned source code (e.g., string, array of lines). An agent would need to infer this. Given low complexity, the description should at least hint at the output structure.

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%, so the baseline is 3. The description adds no additional information about parameters beyond what the schema already provides.

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 states the verb 'Fetch', the resource 'ABAP function group source code', and the context 'from SAP system'. This distinguishes it from sibling tools like get_function_module or get_abap_program.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool vs alternatives like get_function_module or search_object. There is no mention of prerequisites or exclusions.

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/ethanhan2014/sap-adt-mcp'

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