Skip to main content
Glama

GetServiceDefinition

Retrieve the source code of a RAP Service Definition (SRVD) from an SAP ABAP system. Supports paging through large definitions with line offsets.

Instructions

Retrieve RAP Service Definition (SRVD) source code (requires ~NW 7.54 / S/4HANA). For large definitions, use startLine/maxLines to page through the source instead of retrieving it all at once.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxLinesNoMaximum lines to return (1-100000). Omit to request the rest; the byte cap may return fewer lines.
startLineNo1-based line number to start from (default 1). Beyond EOF returns an empty page with hasMore=false.
service_definition_nameYesName of the RAP Service Definition (e.g. Z_MY_SERVICE)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose a read operation, an environment prerequisite, and a paging strategy. However, it omits the return format and error conditions; the byte-cap and hasMore behavior live only in the schema, not the description. It adds useful context but doesn't fully cover behavior.

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?

Two sentences with zero filler. The first sentence front-loads purpose and the version constraint; the second delivers the paging recommendation. Every clause earns its place, and the most important scoping information comes first.

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 3-parameter tool with no annotations and no output schema, the description covers purpose, environment, and paging but leaves out return-value shape and differentiation from closely related siblings. It is adequate but not complete; a brief note on what the returned source looks like or a pointer to GetBehaviorDefinition/GetCDSView would close the gaps.

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 coverage is 100%, with each parameter already well documented (including hasMore=false behavior and the byte cap). The description adds only the strategic guidance to use startLine/maxLines for paging, which reinforces the parameters' purpose but introduces no new per-parameter semantics beyond the schema.

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 (retrieve), a precise resource (RAP Service Definition / SRVD source code), and adds a version qualifier. Among the many sibling 'Get*' tools (GetCDSView, GetBehaviorDefinition, GetFunction), the SRVD target clearly identifies what this tool returns, so an agent can distinguish it 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 Guidelines3/5

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

It provides practical usage guidance: the ~NW 7.54/S/4HANA prerequisite and the explicit recommendation to page through large definitions with startLine/maxLines. However, it never names alternatives or says when not to use this tool versus related getters like GetCDSView or GetBehaviorDefinition, leaving that differentiation to the tool name alone.

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