Tools Reference · cds-kb MCP

Fourteen tools to find, inspect, and compose against the CDS-view knowledge base, plus an optional read-only slice for a live SAP DEV system. Every tool returns readable text and structured JSON, so an agent can chain them without regex-parsing anything.

Looking up a raw field like MATNR? Skip fuzzy search — jump straight to get_views_by_field in Find & Explore below.

Connect — direct HTTP Copied!
{
  "mcpServers": {
    "cds-kb": {
      "type": "http",
      "url": "https://mcp.tringhia.io.vn/mcp"
    }
  }
}
stdio-only client? bridge with supergateway --streamableHttp
devExtStatus released unknown / not_released atcState deprecated no signal recorded shown on tools that surface release-safety signals

01 Find & Explore

Start here — locate a view by meaning, by exact field, or by tag.

search_cds#1

Business-meaning or keyword search across views — accepts classic SAP names (VBAK, BSEG) or plain language. Vietnamese, accent-insensitive.

query string module string lob string bo string limit 1–50
signals

"Tìm view liên quan tới vật tư" → search_cds(query:"material")

get_views_by_field#5

Exact lookup by field name, raw DDIC column, or table/view name — not fuzzy. Use this the moment you already have a concrete name like MATNR or VWERK.

name string limit 1–100
signals

"MATNR nằm ở view nào?" → get_views_by_field(name:"MATNR")

get_cds_view#2

Fetch one view's full definition by exact name — metadata, fields, associations, DDL source. Trim the response with sections.

name string sections string[]

Pattern: search_cds → pick a hit → get_cds_view(name, sections:["metadata","fields"])

get_views_by_tag#3

Deterministic listing by exact tag — use when search_cds feels too fuzzy. Discover valid tags via get_taxonomy first.

tag string limit 1–200

e.g. get_views_by_tag(tag:"bo:salesorder")

get_taxonomy#4

The full semantic map — 12 Lines of Business → 829 Business Objects, with English + Vietnamese keywords. Orient before searching, or discover valid tags.

no parameters
get_view_dependencies#6

Views built FROM or associating to a given view or table. Handy for spotting a released alternative even when your starting view isn't.

name string limit int
signals

02 Build a Query

Once you've picked a view: check the shared library first, then compose → generate → validate.

search_query_library#14

Search shared saved-query recipes and variants by title, view name, or intent. Call this before inventing a shape — on a hit, feed its views[]/select/where straight into compose_query.

query string limit 1–50
suggest_base_views#8

Recommend concrete FROM-base views for a new query — hard-filters out abstract and unverified views.

query string module/lob/bo string limit 1–20
compose_query#9

Build OpenSQL + a CDS define view entity skeleton from a Query Builder JSON shape. Warns when a referenced view is not_released, unknown, or deprecated for Developer Extensibility.

views / select / where / groupBy / having / orderBy json
generate_cds_view#10

Generate annotated DDL — @AccessControl, @EndUserText.label — from a base view. You supply select/where; it won't invent a field list from Hub metadata alone.

baseView string views[] json
validate_cds_ddl#11

Parse DDL with @abaplint/core's CDS parser. Returns soft diagnostics — never crashes the process, no live SAP connection involved.

ddl string

03 Contribute & Track

Feed a good query back to the shared library, or check what's new in the KB.

propose_query_library_entry#12

Build a JSON snippet + PR body for the shared query library. With a configured GitHub token, opens a draft PR — never auto-merges.

takes a composed query shape
view_changelog#13

Recently added/updated views straight from the data repo's changelog — "what's new" without re-searching everything.

action added|updated source string since ISO date limit 1–200
kb_info#7

Server health snapshot — active data source, version, view count, enrichment %, private-overlay count, index build time.

no parameters

04 Live SAP dev system — 8 tools, optional

gated by env — dataless until configured

Read-only ADT access for learning your own Z*/Y* repository objects. System alias locked to DEV, never PRD; no table/business-row reads; nothing is ever auto-merged into the public KB. When the SAP_ADT_* variables are unset, every call below still appears but returns configured: false.

ToolRole
sap_connection_testProbe ADT discovery endpoint
sap_list_packagesList Z*/Y* packages
sap_list_objectsList DDLS objects in a package
sap_get_objectFetch one custom object's source
sap_get_dependenciesBest-effort static DDL names (standard → external)
sap_plan_exportDry-run export plan only
sap_export_snapshotLocal write — source + metadata + manifest, skip-if-exists
sap_diff_snapshotCompare two local snapshot manifests/hashes

Required to enable: SAP_ADT_BASE_URL, SAP_ADT_USERNAME, SAP_ADT_PASSWORD, SAP_ADT_CLIENT — secrets live in env/secret manager only, never in files or logs.

05 Resources & Prompts

The other two MCP primitives — attach context directly, or load a canned prompt in one call.

Resource URIGives you
cds://view/{name}Full markdown of one view by name
cds://taxonomyLOB → BO → keyword map (EN + VI)
cds://statsLive KB stats + auth mode
cds://query-libraryThe shared saved-query list as JSON
PromptArgumentDoes
explain_viewnameFetch + explain in plain language
compose_queryintentLibrary-first compose → generate → validate
validate_ddlddlValidate a pasted DDL snippet