Skip to main content
Glama

GetBehaviorDefinition

Read-onlyIdempotent

Fetch RAP Behavior Definition source code from ABAP systems, with paging options to handle large definitions.

Instructions

Retrieve RAP Behavior Definition (BDEF) 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.
behavior_definition_nameYesName of the RAP Behavior Definition (e.g. I_MY_ENTITY)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark it read-only, idempotent, and non-destructive. The description adds behavioral value by disclosing that large definitions should be paged and that a minimum NetWeaver version is required, which an agent would not infer from the schema alone.

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, front-loaded with the core action and resource, followed by a useful paging tip. There is no filler or repetition of schema details.

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

Completeness4/5

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

For a read-only source retrieval tool, the description plus the fully documented input schema is sufficient to call it correctly. It does not describe the output format, but the schema's startLine hint about hasMore partially covers pagination behavior, so nothing critical is missing.

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%, so the input schema already documents all three parameters with types, constraints, and defaults. The description reinforces the paging strategy but does not add new semantic meaning beyond what the schema 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 names the exact resource ('RAP Behavior Definition (BDEF) source code') and the action ('Retrieve'), leaving no doubt about what is returned. This object type is clearly distinct from the sibling tools such as GetCDSView, GetFunction, and GetStructure.

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

Usage Guidelines4/5

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

It gives a system prerequisite (~NW 7.54 / S/4HANA) and concrete advice to page large definitions with startLine/maxLines. It does not explicitly contrast with sibling tools, but the unique resource type makes the choice obvious, so this is clear context rather than no guidance.

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