Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

create_dcl

Creates and activates a DCL access-control source for a CDS view, enforcing role-based grants and blocking production profiles. Provide a transport request unless using package $TMP.

Instructions

Create a new Access Control / DCL source (DCLS) for a CDS view and activate it. Refuses to run on production profiles. Provide the complete DCL source, e.g. "define role { grant select on where () = aspect pfcg_auth(, , ACTVT = '03'); }" - the role name must match dclName. Needs a transport unless package is $TMP.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dclName": "<dclName>",
      "description": "<description>",
      "packageName": "<packageName>",
      "source": "<source>"
    },
    "name": "create_dcl"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesComplete DCL source (define role <name> { grant select on ... ; })
dclNameYesDCL/access control name, e.g. ZAC_MY_ENTITY. Must match the role name in the source.
activateNoActivate after writing the source
transportNoTransport request. Omit only for $TMP.
descriptionYesShort description
packageNameYesPackage, e.g. ZABAP. Use $TMP for a local throwaway.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With zero annotations the description must carry the whole burden, and it does disclose the safety gate (production refusal), the side effect of activation, and the transport dependency. It does not say what happens if a DCL with that name already exists (error vs overwrite) or what object handle is returned, which are the main residual gaps for a write tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then the guardrail, then the source format, then the transport rule — a sensible order with no filler. The embedded DCL example is long but earns its place by pinning down a free-form string parameter; the hyphen-joined clause is slightly dense but readable.

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 6-parameter mutation tool with no annotations and no output schema, the description covers purpose, safety, activation, naming constraint, and transport semantics. Only the return value and same-name collision behavior are left unstated, which keeps it just short of fully complete.

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 coverage is 100%, so the baseline would be 3, but the description adds a genuine cross-parameter constraint — the role name inside 'source' must match 'dclName' — plus the rule that transport may be omitted only for $TMP. The inline DCL example also clarifies the expected shape of the free-form source string better than the schema line does.

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?

States a specific verb and resource ('Create a new Access Control / DCL source (DCLS) for a CDS view') and even expands the acronym, so the agent knows exactly what is produced. 'Create a new' implicitly separates it from update_dcl/patch_dcl, but no sibling is named, and the built-in activation overlaps conceptually with activate_object without being addressed.

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?

Gives concrete when-not guidance ('Refuses to run on production profiles') and a conditional prerequisite ('Needs a transport unless package is $TMP'). What is missing is routing to alternatives — e.g. when to use update_dcl or patch_dcl instead of creating fresh.

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