Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

patch_cds

Replace one exact string in an existing CDS view DDL to make small edits without resending the full source, then optionally activate; refuses production profiles.

Instructions

Modify PART of an existing CDS view's DDL without resending the whole source. Reads the current source, replaces oldString with newString (must match EXACTLY ONCE), then locks, PUTs, unlocks, and optionally activates. Prefer this over update_cds for small edits like adding a field or annotation. Refuses to run on production profiles.

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": {
      "cdsName": "<cdsName>",
      "oldString": "<oldString>",
      "newString": "<newString>"
    },
    "name": "patch_cds"
  }
}

Input Schema

NameRequiredDescriptionDefault
cdsNameYesCDS entity/DDLS name, e.g. ZKIT_I_PRODUCT
activateNoActivate after writing. Default false - CDS activation is safe; pass true to activate in one call.
newStringYesReplacement text
oldStringYesExact existing DDL text to replace. Must occur exactly once - include enough context to be unique.
transportNoTransport request. Omit only for local/$TMP objects.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden and does well: it discloses the internal sequence (read, replace, lock, PUT, unlock, optional activate), the exactly-once match constraint, and the production-profile refusal. It omits failure/rollback behavior and required authorizations, which matter for a mutating, locking operation.

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?

Three dense sentences, front-loaded with the core mechanic and the uniqueness constraint, then the sibling routing, then the safety gate. No filler and nothing important buried at the end.

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 five-parameter mutating tool with no annotations and no output schema, the description covers workflow, constraints, alternatives, and safety adequately. The remaining gap is return behavior — with no output schema, the agent cannot tell what a successful patch or a non-unique match returns.

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 all five parameters including transport and activate are already documented in the schema. The description restates the exactly-once oldString rule that the schema itself explains, adding little new per-parameter meaning. Baseline 3 is appropriate.

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?

States a specific verb and scope — 'Modify PART of an existing CDS view's DDL without resending the whole source' — which immediately separates it from a full-source update. The contrast with update_cds makes the boundary explicit without requiring the sibling's schema.

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?

Explicitly names the alternative and the condition selecting it: 'Prefer this over update_cds for small edits like adding a field or annotation.' It also states a hard exclusion — refuses to run on production profiles — but does not say what to do instead in that case.

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