sap-ai-dev-toolkit 0.4.5 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.github/agents/abap-developer.agent.md +1 -1
  2. package/.github/agents/abap-runtime-debugger.agent.md +1 -1
  3. package/.github/agents/hana-cloud-hdi-specialist.agent.md +1 -1
  4. package/.github/agents/rap-service-developer.agent.md +1 -1
  5. package/.github/agents/sap-solution-architect.agent.md +1 -1
  6. package/.github/skills/abap-debugging/SKILL.md +1 -1
  7. package/.github/skills/abap-development/SKILL.md +1 -1
  8. package/.github/skills/abap-runtime-analysis/SKILL.md +1 -1
  9. package/.github/skills/abap-testing-quality/SKILL.md +1 -1
  10. package/.github/skills/cds-development/SKILL.md +1 -1
  11. package/.github/skills/clean-core-extensibility/SKILL.md +1 -1
  12. package/.github/skills/hana-cloud-inspection/SKILL.md +1 -1
  13. package/.github/skills/hana-cloud-native-development/SKILL.md +1 -1
  14. package/.github/skills/hana-cloud-validation/SKILL.md +1 -1
  15. package/.github/skills/rap-development/SKILL.md +1 -1
  16. package/.github/skills/rap-service-delivery/SKILL.md +1 -1
  17. package/.github/skills/sap-sdlc-orchestration/SKILL.md +1 -1
  18. package/.github/skills/sap-standard-api-analysis/SKILL.md +1 -1
  19. package/.github/skills/sap-transport-release/SKILL.md +1 -1
  20. package/README.md +21 -14
  21. package/package.json +1 -1
  22. package/scripts/postinstall.mjs +3 -2
  23. package/src/bas-destination-relay.mjs +48 -22
  24. package/src/bas-discovery.mjs +16 -6
  25. package/src/launcher.mjs +24 -14
  26. package/src/mcp-config.mjs +36 -7
  27. package/src/mcp-proxy.mjs +185 -51
  28. package/src/setup.mjs +3 -2
  29. package/test/bas-destination-relay.test.mjs +93 -14
  30. package/test/cf-runtime.test.mjs +2 -2
  31. package/test/discovery.test.mjs +45 -0
  32. package/test/fixtures/fake-vsp.mjs +6 -3
  33. package/test/launcher.test.mjs +15 -13
  34. package/test/live-s4h.test.mjs +13 -11
  35. package/test/mcp-config-cf.test.mjs +127 -15
  36. package/test/mcp-proxy.test.mjs +232 -33
  37. package/test/setup-cf.test.mjs +7 -7
  38. package/tools.md +4 -2
@@ -7,7 +7,7 @@ user-invocable: true
7
7
 
8
8
  You are an ABAP development agent for SAP Business Application Studio (BAS). Follow this workflow in order. Use only capabilities actually exposed by the current workspace and SAP MCP server.
9
9
 
10
- **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access.
10
+ **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. **Clarify the contract.** For every request, state the understood outcome, observable acceptance criteria, assumptions, and required SAP target details. For SAP-targeted changes, identify the destination/system, package, and transport or temporary target. Ask a focused question only when a material requirement or target detail is missing or ambiguous; when the contract is clear, proceed without a confirmation round.
13
13
  2. **Plan before implementing.** Before writing any code, present a concise plan: the objects to create or change, the ABAP Unit test approach, the local authoring and validation plan (workspace files plus `LintABAP` and LSP), and the SAP write and activation steps with the authorizations they require. Proceed without a confirmation round while the work stays read-only or workspace-local; wait for explicit user approval before implementing a plan that writes to or activates in the SAP system. If publication is needed, identify it as an external handoff unless another live server exposes that exact tool.
@@ -7,7 +7,7 @@ user-invocable: true
7
7
 
8
8
  You are a specialized ABAP runtime debugging and performance diagnosis agent for SAP Business Application Studio (BAS). Follow this workflow in order and use only capabilities actually exposed by the current workspace and active SAP MCP server.
9
9
 
10
- **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access.
10
+ **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. **Clarify the incident contract.** State the observed failure/symptom, expected behavior, impacted object/service/user flow, reproducibility, time window, destination/system, client/user context if relevant, and safety constraints. Ask only for missing material details such as target system, reproduction input, or authorization to run/debug a reproduction.
13
13
  2. **Inspect live MCP tools once per server.** Use the active chat's live `tools/list` from the Chat tools picker once and use the exact destination-prefixed names and schemas shown there. Re-query only if destination/configuration changes or a call reports the tool unavailable. Prefer this runtime tool map when present:
@@ -10,7 +10,7 @@ You are the SAP HANA Cloud and HDI specialist for BAS. Analyze only the HANA tar
10
10
  ## Workflow
11
11
 
12
12
  1. **Clarify the outcome and target.** Confirm the business/data goal, intended HANA Cloud service and HDI container, expected schema, project location, acceptance criteria, data sensitivity, and constraints. Distinguish an HDI container from a database, schema, service binding, or generated physical schema. Do not infer a target from a name alone.
13
- 2. **Discover the actual MCP tools.** Inspect the chat-attached server's live `tools/list` and follow each returned schema. Call the exact `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and `hana_read_rows` names only when those tools are present. For separate SAP VSP/ADT operations, use the live destination-prefixed tool names. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue instead.
13
+ 2. **Discover the actual MCP tools.** Inspect the chat-attached server's live `tools/list` and follow each returned schema. Call the exact `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and `hana_read_rows` names only when those tools are present. For separate SAP VSP/ADT operations, use the live destination-prefixed tool names. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue instead. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
14
14
  3. **Verify the connected target before interpreting data.** Use `hana_connection_info` and confirm the configured service/binding, endpoint, current database user, and schema. Credentials are supplied to the MCP process through environment variables such as `HANA_RO_*` or a selected service binding. Never ask the user to paste a password, print credentials, inspect credential values, or write secrets to project files or MCP configuration. If the binding is absent, ambiguous, or does not match the requested target, stop live database inspection and explain the configuration needed.
15
15
  4. **Inspect the existing project before proposing artifacts.** Identify whether the workspace is a CAP project, a standalone HDI module, or a mixed MTA application. Check `package.json`, `cds`, `db/`, `srv/`, HDI deployment files, build/deploy scripts, and existing conventions. Use live CAP/CDS model tools and documentation when available; otherwise inspect local model files and explicitly mark external context as unavailable. Never assume that the toolkit repository is the business application's target.
16
16
  5. **Analyze with bounded read-only calls.** List objects, describe relevant columns, then read only the columns and rows needed for the question. `hana_read_rows` is schema-bound and limited to at most 200 rows; credential-like columns are blocked. Prefer filters and narrow column lists. Do not claim full-container coverage from a capped result; state truncation, missing catalog privileges, and other limits. Treat observed database facts separately from hypotheses and CAP model intent.
@@ -7,7 +7,7 @@ user-invocable: true
7
7
 
8
8
  You are a specialized SAP RAP service development agent for SAP Business Application Studio (BAS). Follow this workflow in order and use only capabilities actually exposed by the current workspace and active SAP MCP server.
9
9
 
10
- **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access.
10
+ **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. **Clarify the RAP contract.** State the requested business outcome, RAP artifacts in scope, acceptance criteria, assumptions, and target details. For SAP-targeted changes, identify the destination/system, package, transport or temporary target, service binding/publication expectations, and whether data mutation for validation is authorized. Ask only when a material target or authorization detail is missing.
13
13
  2. **Plan before implementing.** Before writing any artifact, present a concise plan: the RAP object chain to create or change in dependency order, the ABAP Unit test approach, the local authoring and validation plan (workspace files plus `LintABAP` and LSP), and the SAP write, activation, and publication steps with the authorizations they require. Proceed without a confirmation round while the work stays read-only or workspace-local; wait for explicit user approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
@@ -9,7 +9,7 @@ You are an SAP solution architecture and SDLC orchestration agent for SAP Busine
9
9
 
10
10
  Follow this workflow in order and use only capabilities actually exposed by the current workspace and active SAP MCP server.
11
11
 
12
- **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access.
12
+ **Direct MCP invocation is mandatory.** The Copilot host initializes MCP and supplies its live `tools/list` and schemas in the Chat tools picker. Invoke the attached destination-prefixed tools directly. Do not launch `sap-ai-dev` or another server binary, drive stdio/JSON-RPC from a terminal, or handcraft a JSON-RPC handshake for MCP operations. If a needed server or tool is visible in the picker but is not callable by this agent, stop and report the host/session binding issue; do not substitute CLI access. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
13
13
 
14
14
  1. **Clarify the requirement and target landscape.** State the business outcome, affected SAP product/system, process area, acceptance criteria, integration boundaries, data ownership, non-functional requirements, security/compliance needs, operational expectations, and assumptions. Identify destination/system, package namespace, cloud/on-premise constraints, transport expectations, and whether implementation is requested now or only a plan is needed. Ask only for missing material details.
15
15
  2. **Inspect live MCP tools once per server and investigate the system.** Use the active chat's live `tools/list` from the Chat tools picker once and use the exact destination-prefixed names and schemas shown there. Re-query only when destination/configuration changes or a call reports the tool unavailable. Build a system fact base before recommending anything: installed capabilities, object conventions, existing APIs, released status, dependencies, data model, runtime symptoms, and transport context. Prefer this analysis tool map when present:
@@ -7,7 +7,7 @@ description: Diagnose ABAP runtime failures using SAP dumps, application logs, t
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use the destination-prefixed tool and schema for the target. Start with `GetApplicationLog`, source/object inspection (`SearchObject`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `ListDependencies`), and safe data inspection (`RunQuery`, `GetTableContents`). For an authorized debugger session, use `SetBreakpoint`, `DebuggerAttach`, inspect with `DebuggerGetStack` / `DebuggerGetVariables`, step with `DebuggerStep`, and finish with `DebuggerDetach`. Avoid attaching to another user's session. Dump, trace, debugger-listen, delete-breakpoint, and arbitrary execution/RFC tools are not exposed by this addon.
10
+ Query the active MCP server's live `tools/list` once; use the destination-prefixed tool and schema for the target. Start with `GetApplicationLog`, source/object inspection (`SearchObject`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `ListDependencies`), and safe data inspection (`RunQuery`, `GetTableContents`). For an authorized debugger session, use `SetBreakpoint`, `DebuggerAttach`, inspect with `DebuggerGetStack` / `DebuggerGetVariables`, step with `DebuggerStep`, and finish with `DebuggerDetach`. Avoid attaching to another user's session. Dump, trace, debugger-listen, delete-breakpoint, and arbitrary execution/RFC tools are not exposed by this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Reproduce the reported failure when safe and within the requested target. Establish the observed input, outcome, and execution context before changing code.
13
13
  2. Inspect relevant application logs, source, dependency/reference context, safe runtime data, and debugger state using only the current live MCP tool listing and schemas. Correlate evidence to the failing path before proposing a cause; when dumps or traces are needed, hand off to SAP tools outside this addon.
@@ -7,7 +7,7 @@ description: Implement or change ABAP programs, classes, interfaces, function gr
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Read with `GetSource` and `GetContext`; trace callers or dependencies with `FindDefinition` and `FindReferences`. Use `EditSource` for a localized change and `WriteSource` for a larger rewrite. Lint caller-supplied source with `LintABAP`; validate with `SyntaxCheck` and `RunUnitTests`, plus `RunATCCheck` when exposed and relevant. For Clean Core requirements, use `GetAPIReleaseState` on each relevant dependency.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Read with `GetSource` and `GetContext`; trace callers or dependencies with `FindDefinition` and `FindReferences`. Use `EditSource` for a localized change and `WriteSource` for a larger rewrite. Lint caller-supplied source with `LintABAP`; validate with `SyntaxCheck` and `RunUnitTests`, plus `RunATCCheck` when exposed and relevant. For Clean Core requirements, use `GetAPIReleaseState` on each relevant dependency. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Read the target object, its callers and dependencies, related ABAP Unit tests, and established repository conventions before choosing an implementation. When Clean Core or ABAP Cloud compatibility is required, check released-API status for relevant dependencies using `PlanABAPCloudMigration` where available; inspect its per-object SAP evidence and resolve unknown states with the live `GetAPIReleaseState` tool.
13
13
  2. Plan before implementing. Present the plan before writing code: objects to create or change, ABAP Unit test approach, local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
@@ -7,7 +7,7 @@ description: Analyze ABAP runtime incidents, dumps, traces, debugger state, call
7
7
 
8
8
  ## MCP tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once and use exact destination-prefixed names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `GetContext`, `GetApplicationLog`, `DebuggerAttach`, `DebuggerGetStack`, `DebuggerGetVariables`, `DebuggerStep`, `DebuggerDetach`, `SetBreakpoint`, `GetBreakpoints`, `FindDefinition`, `FindReferences`, `CompareSource`, `ListDependencies`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetFunction`, `GetFunctionGroup`, `GetProgram`, `GetInclude`, `GetInterface`, `GetPackage`, `GetTable`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `RunQuery`, and `GetTableContents`. For authorized fixes, also use `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `Activate`, and `ActivateMultiple`. Dump, trace, arbitrary execution/RFC, and delete-breakpoint helpers are not exposed by this addon.
10
+ Query the active MCP server's live `tools/list` once and use exact destination-prefixed names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `GetContext`, `GetApplicationLog`, `DebuggerAttach`, `DebuggerGetStack`, `DebuggerGetVariables`, `DebuggerStep`, `DebuggerDetach`, `SetBreakpoint`, `GetBreakpoints`, `FindDefinition`, `FindReferences`, `CompareSource`, `ListDependencies`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetFunction`, `GetFunctionGroup`, `GetProgram`, `GetInclude`, `GetInterface`, `GetPackage`, `GetTable`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `RunQuery`, and `GetTableContents`. For authorized fixes, also use `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `Activate`, and `ActivateMultiple`. Dump, trace, arbitrary execution/RFC, and delete-breakpoint helpers are not exposed by this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Establish incident boundaries: symptom, expected result, object/service, destination, user/session, input, time window, frequency, and whether reproduction/debugging is authorized.
13
13
  2. Gather read-only evidence first. Correlate logs, source/reference context, dependencies, debugger state, and data conditions by timestamp and object path. Do not start with source edits.
@@ -7,7 +7,7 @@ description: Design ABAP Unit behavior tests and validate ABAP changes with lint
7
7
 
8
8
  ## Tool selection
9
9
 
10
- Query the active MCP server's live `tools/list` once, then use only task-relevant, destination-prefixed tools with their returned schemas: `LintABAP` for caller-supplied source, `SyntaxCheck` for SAP syntax validation, `RunUnitTests` for ABAP Unit, and `RunATCCheck` for ATC. Unavailable tools are not passes.
10
+ Query the active MCP server's live `tools/list` once, then use only task-relevant, destination-prefixed tools with their returned schemas: `LintABAP` for caller-supplied source, `SyntaxCheck` for SAP syntax validation, `RunUnitTests` for ABAP Unit, and `RunATCCheck` for ATC. Unavailable tools are not passes. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  - Treat ABAP Unit as behavior verification: assert externally observable results, boundaries, state transitions, and relevant error behavior. Static analysis, syntax checks, and activation find different classes of problems and do not replace behavior tests.
13
13
  - For a behavior change, create or refine a real ABAP Unit assertion first, run it to observe the regression, then rerun after implementation. If an executable red/green cycle is unavailable, state the concrete constraint and the strongest check actually performed; never report a substitute as a passing test.
@@ -7,7 +7,7 @@ description: Implement, change, or analyze ABAP CDS data definitions and their d
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Read DDLS with `GetSource`; use `GetCDSDependencies` for upstream dependencies, `GetCDSImpactAnalysis` for consumers, and `GetCDSElementInfo` for element metadata. Trace references with `FindReferences`; edit via `EditSource` / `WriteSource`. Validate with `SyntaxCheck`, `RunATCCheck`, activation, and read-only runtime queries via `RunQuery` or `GetTableContents` when exposed.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Read DDLS with `GetSource`; use `GetCDSDependencies` for upstream dependencies, `GetCDSImpactAnalysis` for consumers, and `GetCDSElementInfo` for element metadata. Trace references with `FindReferences`; edit via `EditSource` / `WriteSource`. Validate with `SyntaxCheck`, `RunATCCheck`, activation, and read-only runtime queries via `RunQuery` or `GetTableContents` when exposed. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Inspect the target DDLS source, its existing data definitions, package conventions, dependencies, and consumers before editing.
13
13
  2. Use live `GetCDSDependencies`, `GetCDSImpactAnalysis`, and `GetCDSElementInfo` tools when exposed to understand upstream sources, downstream impact, and element metadata. Use their current destination-prefixed names and schemas.
@@ -7,7 +7,7 @@ description: Design SAP extensions using Clean Core principles, released extensi
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Inspect system capabilities with `GetSystemInfo`, `GetFeatures`, and `GetInstalledComponents`; inspect source and dependencies with `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `CompareSource`, `ListDependencies`, `GetCDSDependencies`, and `GetCDSImpactAnalysis`. Check release status with `GetAPIReleaseState` or batch with `PlanABAPCloudMigration` where exposed. Use transport tools only for planning/readiness context and never claim transport release/deletion support; transport release is unavailable through this addon.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Inspect system capabilities with `GetSystemInfo`, `GetFeatures`, and `GetInstalledComponents`; inspect source and dependencies with `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `CompareSource`, `ListDependencies`, `GetCDSDependencies`, and `GetCDSImpactAnalysis`. Check release status with `GetAPIReleaseState` or batch with `PlanABAPCloudMigration` where exposed. Use transport tools only for planning/readiness context and never claim transport release/deletion support; transport release is unavailable through this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Classify the requirement as configuration, in-app/key-user extensibility, developer extensibility, side-by-side extension, integration, analytics, UI extension, or unavoidable core change.
13
13
  2. Prefer the cleanest pattern in this order: SAP standard configuration, released in-app extensibility, released developer extensibility, released APIs/events, side-by-side SAP BTP extension, then carefully isolated custom ABAP only if no compliant option exists.
@@ -19,7 +19,7 @@ For the ABAP destination server, `RunQuery` is ABAP SQL—not HANA SQL. Use dest
19
19
  ## Procedure
20
20
 
21
21
  1. Confirm the user’s requested system/container and expected schema. Do not assume a binding name uniquely identifies a database.
22
- 2. Query live `tools/list`, use the returned tool names and schemas exactly, and invoke the chat-attached tools directly. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or fall back to a CLI when chat tools are missing; report a host/session binding issue.
22
+ 2. Query live `tools/list`, use the returned tool names and schemas exactly, and invoke the chat-attached tools directly. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or fall back to a CLI when chat tools are missing; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
23
23
  3. Call `hana_connection_info` first. Compare endpoint, binding, schema, and current user against the request. If the result is missing, ambiguous, or mismatched, stop and report the issue; never ask the user to paste credentials or change the target based on model-supplied tool arguments.
24
24
  4. Inventory only relevant objects using `hana_list_objects`. If its result is capped, say so and narrow the object type or investigation; do not describe a partial listing as exhaustive.
25
25
  5. Call `hana_describe_object` before reading values. Select only required columns. Use `hana_read_rows` with narrow filters, a small limit, and optional ordering. Inputs are bound values; object/schema names are never treated as SQL text.
@@ -7,7 +7,7 @@ description: Develop SAP HANA Cloud CAP and HDI database components locally, inc
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Inspect the active workspace and its CAP/HDI tooling first. Query `tools/list` for live MCP availability and use exact destination-prefixed names for any SAP VSP tools. Use the CDS/CAP MCP model and documentation tools when available; otherwise inspect the project's local `.cds`, package, MTA, and HDI files and mark missing context. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue.
10
+ Inspect the active workspace and its CAP/HDI tooling first. Query `tools/list` for live MCP availability and use exact destination-prefixed names for any SAP VSP tools. Use the CDS/CAP MCP model and documentation tools when available; otherwise inspect the project's local `.cds`, package, MTA, and HDI files and mark missing context. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or use a CLI fallback when chat tools are unavailable; report a host/session binding issue. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  ## Procedure
13
13
 
@@ -7,7 +7,7 @@ description: Validate HANA Cloud CAP and HDI changes locally, inspect deployment
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Use live `tools/list` for HANA and SAP tool availability. HANA inspection is limited to `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and bounded `hana_read_rows`; SAP VSP tools use their live destination-prefixed names. Use CAP/CDS documentation and model tools where available. Do not use ABAP `RunQuery`, ABAP Unit, or `LintABAP` as HANA validation. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or substitute CLI output for chat-attached MCP evidence; report a host/session binding issue if tools are unavailable.
10
+ Use live `tools/list` for HANA and SAP tool availability. HANA inspection is limited to `hana_connection_info`, `hana_list_objects`, `hana_describe_object`, and bounded `hana_read_rows`; SAP VSP tools use their live destination-prefixed names. Use CAP/CDS documentation and model tools where available. Do not use ABAP `RunQuery`, ABAP Unit, or `LintABAP` as HANA validation. Direct MCP invocation is mandatory. Do not launch `sap-ai-dev` or `sap-ai-hana` for MCP operations, handcraft JSON-RPC in a terminal, or substitute CLI output for chat-attached MCP evidence; report a host/session binding issue if tools are unavailable. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  ## Procedure
13
13
 
@@ -7,7 +7,7 @@ description: Develop SAP RAP business objects, behavior, projections, and OData
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Check support with `GetSystemInfo` / `GetFeatures`; inspect sources and structure with `GetSource`, `GetContext`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `GetClassInfo`, and related class/include tools. Edit with `EditSource` / `WriteSource` or reviewed `PrepareABAPChangeSet` / `ApplyABAPChangeSet`; validate with `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `RunQuery`, `GetTableContents`, and RAP regression-suite tools when exposed. Activate with `Activate` / `ActivateMultiple` only when requested. Service publication is not exposed by this addon; hand it off unless another live server exposes that exact tool.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Check support with `GetSystemInfo` / `GetFeatures`; inspect sources and structure with `GetSource`, `GetContext`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `GetClassInfo`, and related class/include tools. Edit with `EditSource` / `WriteSource` or reviewed `PrepareABAPChangeSet` / `ApplyABAPChangeSet`; validate with `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `RunQuery`, `GetTableContents`, and RAP regression-suite tools when exposed. Activate with `Activate` / `ActivateMultiple` only when requested. Service publication is not exposed by this addon; hand it off unless another live server exposes that exact tool. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Inspect target-system release and capabilities with live `GetSystemInfo` and `GetFeatures` tools when available; inspect existing RAP objects and package conventions before design. Confirm RAP support and each required operation from the active MCP `tools/list`, not from static documentation.
13
13
  2. Plan before implementing. Present the RAP artifact chain to create or change in dependency order, the ABAP Unit test approach, the local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation/publication steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
@@ -7,7 +7,7 @@ description: Validate and deliver SAP RAP OData services, behavior implementatio
7
7
 
8
8
  ## MCP tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once and use exact destination-prefixed names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetInterface`, `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `RunQuery`, `GetTableContents`, `GenerateRAPRegressionSuite`, `RunRAPRegressionSuite`, `GetApplicationLog`, `Activate`, and `ActivateMultiple`. Publish/unpublish, dump, trace, arbitrary execution/RFC, and code-coverage tools are not exposed by this addon.
10
+ Query the active MCP server's live `tools/list` once and use exact destination-prefixed names and schemas. Prefer these curated addon tools when available: `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, `GetCDSElementInfo`, `GetClass`, `GetClassInfo`, `GetClassComponents`, `GetClassInclude`, `GetInterface`, `EditSource`, `WriteSource`, `PrepareABAPChangeSet`, `ApplyABAPChangeSet`, `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, `PrettyPrint`, `RunQuery`, `GetTableContents`, `GenerateRAPRegressionSuite`, `RunRAPRegressionSuite`, `GetApplicationLog`, `Activate`, and `ActivateMultiple`. Publish/unpublish, dump, trace, arbitrary execution/RFC, and code-coverage tools are not exposed by this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Confirm target destination, package, transport/temporary target, RAP object names, and whether activation/publication/data mutation is authorized. Transport release and deletion remain out of scope for this skill; prepare and report transport context only.
13
13
  2. Plan before implementing. Present the RAP object chain to create or change in dependency order, the ABAP Unit test approach, the local authoring and validation approach (workspace files plus `LintABAP` and LSP), and the SAP write/activation/publication steps with the authorizations they require. Proceed while the work stays read-only or workspace-local; wait for explicit approval before implementing a plan that writes to, activates in, or publishes to the SAP system.
@@ -7,7 +7,7 @@ description: Orchestrate the SAP delivery lifecycle from requirement analysis th
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Investigate system and repository context with `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `CompareSource`, and dependency tools (`ListDependencies`, CDS dependency/impact tools). Validate with `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, runtime queries, `GetApplicationLog`, and RAP regression-suite tools when exposed. Use transport tools for readiness planning only; never claim transport release/deletion support because transport release is unavailable through this addon.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Investigate system and repository context with `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, `GetInstalledComponents`, `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `CompareSource`, and dependency tools (`ListDependencies`, CDS dependency/impact tools). Validate with `LintABAP`, `SyntaxCheck`, `RunUnitTests`, `RunATCCheck`, runtime queries, `GetApplicationLog`, and RAP regression-suite tools when exposed. Use transport tools for readiness planning only; never claim transport release/deletion support because transport release is unavailable through this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Convert the requirement into an SDLC plan: discovery, fit-gap/API recommendation, architecture, implementation packages, test strategy, validation gates, activation/publication gates, transport readiness, deployment notes, rollback, and operations handover.
13
13
  2. Require a planning phase before implementation for every work package. Each package starts with a presented plan of objects, tests, and validation steps; no SAP state-changing package proceeds before the user approves it. Every implementation package includes a local quality gate: sources are authored locally as abapGit-style workspace files (`object.type.extension`) and must pass `LintABAP` plus LSP checks before they are sent to the SAP system.
@@ -7,7 +7,7 @@ description: Assess requirements against SAP standard capabilities, released API
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Inspect target capabilities with `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, and `GetInstalledComponents`. Search candidates with `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, and `GetCDSElementInfo`. Verify released API status with `GetAPIReleaseState` or batch with `PlanABAPCloudMigration` when exposed. Use `RunQuery` or `GetTableContents` only for safe read-only evidence. Never claim transport release/deletion support; transport release is unavailable through this addon.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Inspect target capabilities with `GetSystemInfo`, `GetFeatures`, `GetConnectionInfo`, and `GetInstalledComponents`. Search candidates with `SearchObject`, `GrepObjects`, `GrepPackages`, `GetSource`, `GetContext`, `FindDefinition`, `FindReferences`, `ListDependencies`, `GetCDSDependencies`, `GetCDSImpactAnalysis`, and `GetCDSElementInfo`. Verify released API status with `GetAPIReleaseState` or batch with `PlanABAPCloudMigration` when exposed. Use `RunQuery` or `GetTableContents` only for safe read-only evidence. Never claim transport release/deletion support; transport release is unavailable through this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Translate the requirement into business capabilities, integration contracts, data entities, and observable acceptance criteria before choosing implementation objects.
13
13
  2. Prefer SAP standard configuration, standard processes, communication scenarios, released OData/RFC/BAPI APIs, released CDS views/entities, RAP BOs, business events, BADIs, and documented extension points. Record all inspected candidates and whether each is standard, released, deprecated, unavailable, or unverified.
@@ -7,7 +7,7 @@ description: Prepare ABAP changes for SAP transport and verify request contents,
7
7
 
8
8
  ## Tool shortlist
9
9
 
10
- Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Identify candidates with `GetUserTransports` or `ListTransports`; inspect a request with `GetTransport` / `GetTransportInfo`; use `CheckTransportReadiness` to collect transport, dependency, inactive-object, ABAP Unit, and ATC evidence when available. Activate with `Activate` / `ActivateMultiple` only when requested. `CreateTransport` is state-changing and requires explicit authorization. Release and deletion are not available through this addon.
10
+ Query the active MCP server's live `tools/list` once; use task-relevant, destination-prefixed tools with their returned schemas. Identify candidates with `GetUserTransports` or `ListTransports`; inspect a request with `GetTransport` / `GetTransportInfo`; use `CheckTransportReadiness` to collect transport, dependency, inactive-object, ABAP Unit, and ATC evidence when available. Activate with `Activate` / `ActivateMultiple` only when requested. `CreateTransport` is state-changing and requires explicit authorization. Release and deletion are not available through this addon. Tool names shown in PascalCase (such as `GetSource` or `LintABAP`) are logical names; the live MCP surface exposes them lowercase and snake_case under the `sap_system_<destination>_` prefix, so `GetSource` on destination `DEMO_ABAP` appears as `sap_system_demo-abap_get_source`. Always call the exact names returned by `tools/list`.
11
11
 
12
12
  1. Use `CheckTransportReadiness` with exactly one `GetTransport` check for the requested ID and applicable dependency, inactive-object, test, and ATC checks. Review each returned evidence item; a completed call can still contain findings. Verify the destination, package, complete object set, dependencies, and an eligible modifiable request before preparing changes.
13
13
  2. Create a transport only when the user specifically authorized its creation. Before transport handoff, ensure changed objects have been activated in dependency order when activation is authorized, ABAP Unit tests have been run or blockers documented, runtime validation evidence exists for changed public contracts, and ATC/syntax checks have been run where available. Do not treat request contents, syntax, ATC, or activation as substitutes for behavior and runtime validation evidence. Report actual request contents and validation state.
package/README.md CHANGED
@@ -61,7 +61,7 @@ Then connect a destination in SAP Business Application Studio:
61
61
 
62
62
  1. Open the Command Palette.
63
63
  2. Run **MCP: List Servers**.
64
- 3. Start the server named after your selected BAS destination.
64
+ 3. Start the server named after your selected BAS destination (the lowercase slug, for example `demo-abap` for destination `DEMO_ABAP`).
65
65
  4. In GitHub Copilot Chat, choose the best-fit bundled agent from the agent picker: **SAP Solution Architect**, **ABAP Developer**, **ABAP Runtime Debugger**, **RAP Service Developer**, or **HANA Cloud/HDI Specialist**.
66
66
  5. In the Chat tools picker, enable the server for that BAS destination.
67
67
  6. Ask Copilot to inspect, build, test, or verify something in your SAP landscape.
@@ -388,7 +388,7 @@ The sample values sketch an on-premise ABAP backend routed through SAP Cloud Con
388
388
 
389
389
  | Destination field | Example | Notes |
390
390
  | --- | --- | --- |
391
- | `Name` | `DEMO_ABAP` | Unique BAS destination name. It becomes both `SAP_AI_DEV_TOOLKIT_DESTINATION` and the generated MCP server name. |
391
+ | `Name` | `DEMO_ABAP` | Unique BAS destination name. It becomes `SAP_AI_DEV_TOOLKIT_DESTINATION`, and its lowercase slug (`demo-abap`) becomes the generated MCP server name. |
392
392
  | `Type` | `HTTP` | ADT is an HTTP service. |
393
393
  | `URL` | `https://abap.example.com:44300` | Backend URL exposed through the configured route. |
394
394
  | `Proxy Type` | `OnPremise` | Use `OnPremise` for Cloud Connector; use `Internet` for a directly reachable public endpoint. |
@@ -456,9 +456,10 @@ Credentials, cookies, SAP usernames, passwords, and raw BAS destination payloads
456
456
  The configuration path is selected in this order:
457
457
 
458
458
  1. `SAP_AI_DEV_MCP_CONFIG`, when set.
459
- 2. `BAS_VSP_MCP_CONFIG`, when set for compatibility with earlier releases.
460
- 3. An existing MCP user configuration detected automatically.
461
- 4. The default MCP user configuration location.
459
+ 2. `SAP_AI_DEV_TOOLKIT_MCP_CONFIG`, when set.
460
+ 3. `BAS_VSP_MCP_CONFIG`, when set for compatibility with earlier releases.
461
+ 4. An existing MCP user configuration detected automatically.
462
+ 5. The default MCP user configuration location.
462
463
 
463
464
  Set `SAP_AI_DEV_MCP_CONFIG` to use a specific configuration file:
464
465
 
@@ -488,7 +489,9 @@ Without `H2O_URL`, the command passes arguments directly to the installed VSP bi
488
489
 
489
490
  `sap-ai-dev` is an MCP stdio server and destination router, not a terminal command for individual SAP operations. No shell incantations needed: your MCP client discovers the tools, picks one for the chat request, and sends the call over stdio.
490
491
 
491
- Each generated MCP server entry uses its BAS destination name verbatim: `DEMO_ABAP` stays `DEMO_ABAP`. Tool names use the normalized destination slug instead, so the prefix is `demo-abap` (`demo-abap__GetSource`, `demo-abap__RunQuery`, `demo-abap__LintABAP`). Use the exact names shown by your MCP client; punctuation can change during slugification.
492
+ Each generated MCP server entry is named with the lowercased destination slug: `DEMO_ABAP` becomes `demo-abap`. Tool names carry a `sap_system_<destination-slug>_<tool>` prefix with a lowercase snake_case tool segment (`sap_system_demo-abap_get_source`, `sap_system_demo-abap_run_query`, `sap_system_demo-abap_lint_abap`), so every tool states which SAP system it targets. Lowercase names are deliberate: BAS and VS Code derive chat tool references from the server and tool names and only bind lowercase identifiers, so mixed-case names show up in the tools picker but never bind to the chat session. Use the exact names shown by your MCP client; punctuation can change during slugification.
493
+
494
+ Upgrading from an earlier release that wrote mixed-case entry names (for example `ActionS4D` or `cf:<guid>:<guid>:<name>`)? Re-run `sap-ai-dev --setup` to replace legacy entries — this is the only migration path for Cloud Foundry entries — or run `sap-ai-dev --doctor` to rename BAS entries in place. Then reload the BAS window and start a new chat; an existing chat keeps its stale tool binding. If setup reports that the lowercase name already exists and is not managed by this package, rename or remove that user-owned server entry first.
492
495
 
493
496
  The proxy keeps VSP tool descriptions and input schemas, then adds the destination label. `LintABAP` and the workflow tools are implemented locally; they use the schemas shown by `tools/list` and call only the destination attached to their name. Linting operates on submitted source in memory. The live `tools/list` result remains the source of truth for the installed VSP binary's exact schemas.
494
497
 
@@ -502,7 +505,7 @@ The menu includes the tools registered by the active VSP mode, the `GetApplicati
502
505
 
503
506
  ### 🧹 Lint submitted ABAP source locally
504
507
 
505
- The per-destination tool name is `<destination-slug>__LintABAP`, for example `demo-abap__LintABAP`. It accepts caller-supplied abapGit-serialized source files; config is optional and, when present, is the full abaplint configuration rather than a merge with defaults.
508
+ The per-destination tool name is `sap_system_<destination-slug>_lint_abap`, for example `sap_system_demo-abap_lint_abap` (the local workflow name `LintABAP` is exposed in snake_case). It accepts caller-supplied abapGit-serialized source files; config is optional and, when present, is the full abaplint configuration rather than a merge with defaults.
506
509
 
507
510
  ```json
508
511
  {
@@ -538,7 +541,7 @@ For a transport report, include exactly one `GetTransport` check whose `transpor
538
541
 
539
542
  For an ABAP Cloud assessment, get object URIs from `SearchObject` and pass them to `PlanABAPCloudMigration`. It reports release evidence; it does not guess replacement APIs. Save the JSON from `GenerateRAPRegressionSuite` and pass it to `RunRAPRegressionSuite` after relevant service changes.
540
543
 
541
- `sap-ai-dev --doctor` probes each discovered destination, checks that each managed MCP entry still matches its selected BAS destination, starts VSP, lists MCP tools, and preflights `/sap/bc/adt/datapreview/freestyle` through the runtime relay before calling `GetSystemInfo`. It repairs only tagged toolkit-owned BAS entries that can be verified against complete destination discovery; it does not add destinations, remove stale or third-party entries, or overwrite malformed configuration. `--doctor --json` reports redacted session diagnostics (HTTP status, cookie count, retry/fallback counters; never token or cookie values) and exits unsuccessfully when a required check fails.
544
+ `sap-ai-dev --doctor` probes each discovered destination, checks that each managed MCP entry still matches its selected BAS destination, starts VSP, lists MCP tools, and preflights the runtime relay's CSRF session (token fetched from the GET-capable ADT discovery endpoint, the same token POST-only services such as data preview rely on) before calling `GetSystemInfo`. It repairs only tagged toolkit-owned BAS entries that can be verified against complete destination discovery; it does not add destinations, remove stale or third-party entries, or overwrite malformed configuration. `--doctor --json` reports redacted session diagnostics (HTTP status, cookie count, retry/fallback counters; never token or cookie values) and exits unsuccessfully when a required check fails.
542
545
 
543
546
  `tools/list` confirms what this MCP server exposes; it does not prove that VS Code attached the server to the active chat. Start the selected destination in **MCP: List Servers**, enable it in the Chat tools picker, and reload/reselect the agent if the host binding is stale. This add-on cannot inspect or repair another MCP server's registration or a host-wide tool budget.
544
547
 
@@ -639,7 +642,7 @@ The proxy intentionally does not expose the full child VSP process. Object delet
639
642
  3. Ask for the operation in plain language. The MCP client sends `tools/call`; no need to type a tool such as `GetSource` into a terminal.
640
643
  4. Check the response in chat. For source edits, ask for a syntax check and tests before activation when that matches your workflow.
641
644
 
642
- For a quick table read—say, company codes from `T001`—select the destination's `RunQuery` tool (for `DEMO_ABAP`, `demo-abap__RunQuery`) and pass:
645
+ For a quick table read—say, company codes from `T001`—select the destination's `RunQuery` tool (for `DEMO_ABAP`, `sap_system_demo-abap_run_query`) and pass:
643
646
 
644
647
  ```json
645
648
  {
@@ -656,7 +659,7 @@ The same request can be expressed to an MCP client as:
656
659
  "id": 2,
657
660
  "method": "tools/call",
658
661
  "params": {
659
- "name": "demo-abap__RunQuery",
662
+ "name": "sap_system_demo-abap_run_query",
660
663
  "arguments": {
661
664
  "sql_query": "SELECT BUKRS, BUTXT, WAERS, LAND1 FROM T001",
662
665
  "max_rows": 100
@@ -686,13 +689,13 @@ The MCP client discovers the schemas; callers do not need to memorize every argu
686
689
  | Add-on command options | `sap-ai-dev --help` |
687
690
  | BAS destinations and probe status | `sap-ai-dev --list-destinations --json` |
688
691
  | Destination availability only | `sap-ai-dev --check` |
689
- | Generated server names and destination mapping | **MCP: Open User Configuration**; look for entries named after the BAS destination and `BAS_VSP_DESTINATION`. |
692
+ | Generated server names and destination mapping | **MCP: Open User Configuration**; look for lowercase slug entries (for example `demo-abap`) whose `SAP_AI_DEV_TOOLKIT_DESTINATION` names the BAS destination. |
690
693
  | Running server | **MCP: List Servers**; select the server and choose **Start Server**. |
691
694
  | Tools and exact schemas | Expand that server in the Chat tools picker. The MCP host requests `tools/list`, whose entries include `name`, `description`, and `inputSchema`; the agent should call those tools through chat, not reproduce the protocol in a terminal. |
692
695
  | Runtime and tool-call logs | Select the MCP server in the Output view. Startup, call lifecycle, and child stderr logs are written to stderr; child MCP log notifications are forwarded to the client. Tool arguments and result contents are not logged. |
693
696
  | Installed package version | `npm list --global sap-ai-dev-toolkit` |
694
697
 
695
- If the server is running but an agent reports that SAP tools are unavailable, verify that the same chat is in Agent mode, the generated server is enabled in that chat's tools picker, and concrete names such as `s4h__GetSystemInfo` are listed. Reselect the agent or start a new chat if the tool binding is stale, then inspect the MCP server's Output log for startup or `tools/list` errors. Do not try to work around a missing chat binding by starting the server or handcrafting JSON-RPC from the terminal.
698
+ If the server is running but an agent reports that SAP tools are unavailable, verify that the same chat is in Agent mode, the generated server is enabled in that chat's tools picker, and concrete names such as `sap_system_s4h_get_system_info` are listed. All generated server and tool names are lowercase; a mixed-case entry such as `ActionS4D` is a pre-upgrade leftover that chat cannot bind — rerun setup or `--doctor` as described above to migrate it. Reselect the agent or start a new chat if the tool binding is stale, then inspect the MCP server's Output log for startup or `tools/list` errors. Do not try to work around a missing chat binding by starting the server or handcrafting JSON-RPC from the terminal.
696
699
 
697
700
  After MCP initialization, the host internally sends a request like this; agents should not reproduce it in the terminal:
698
701
 
@@ -704,7 +707,7 @@ The response contains a `tools` array. A `RunQuery` entry resembles this excerpt
704
707
 
705
708
  ```json
706
709
  {
707
- "name": "demo-abap__RunQuery",
710
+ "name": "sap_system_demo-abap_run_query",
708
711
  "description": "Execute an ABAP SQL query [destination: DEMO_ABAP]",
709
712
  "inputSchema": {
710
713
  "type": "object",
@@ -746,7 +749,7 @@ The response contains a `tools` array. A `RunQuery` entry resembles this excerpt
746
749
 
747
750
  The relay between the VSP child and each BAS destination recovers from the failure modes that break ADT writes over `.dest` proxies:
748
751
 
749
- 1. **CSRF session pairing** — a scoped cookie jar retains session cookies received during safe reads and token fetches, applies updates and expirations, and replays the matching token/cookie pair on POST/PUT/PATCH/DELETE. If SAP returns a token without a usable session cookie, the relay fails closed and does not send the unsafe request.
752
+ 1. **CSRF session pairing** — a scoped cookie jar retains session cookies received during safe reads and token fetches, applies updates and expirations, and replays the matching token/cookie pair on POST/PUT/PATCH/DELETE. Tokens are session-scoped and always fetched from the GET-capable `/sap/bc/adt/discovery` endpoint, so unsafe requests to POST-only services (ADT data preview) are covered too. If no token can be obtained at all, the relay fails closed and does not send the unsafe request. A token that arrives without session cookies is still used — BAS proxy routes strip `Set-Cookie`, yet the backend accepts the token on the proxy-established Basic-auth session — and a CSRF rejection on such a cookie-less route is surfaced without pointless retries.
750
753
  2. **Session refresh** — when SAP explicitly rejects a CSRF token, the cached session is dropped, a fresh token+cookie pair is fetched, and the request is retried within the configured bound. Generic authorization 401/403 responses are returned without being mislabeled or retried as CSRF failures.
751
754
  3. **Proxy tunnel fallback** — when the BAS proxy refuses absolute-form requests (502/504 or transport errors), the relay switches to a CONNECT tunnel through the same proxy and keeps going.
752
755
  4. **Child crash recovery** — a crashed VSP child is restarted transparently, re-initialized, tools re-registered, and the interrupted `tools/call` retried once before any error reaches the client.
@@ -754,6 +757,10 @@ The relay between the VSP child and each BAS destination recovers from the failu
754
757
  6. **Cloud Connector credential overrides** — setup also offers per-destination overrides for BasicAuthentication OnPremise destinations. BAS OnPremise credentials travel through an HTTP CONNECT tunnel to the BAS `.dest` endpoint, retaining its Cloud Connector mapping; setup saves the override only after a read-only probe returns both a CSRF token and a session cookie. If that route check fails, the override is not saved. Cloud Foundry OnPremise overrides replace only the SAP backend user/password; Connectivity service-key authentication and its proxy route remain unchanged. PrincipalPropagation is never overridden. Rerun `sap-ai-dev --setup` to change credentials or answer No to disable a stored override. Deselecting a destination (or selecting none) removes stale overrides.
755
758
  Existing installs that still set the previous `BAS_VSP_*` environment variables remain supported. The setup wizard writes new MCP entries with the `SAP_AI_DEV_TOOLKIT_*` names.
756
759
 
760
+ #### Server logging
761
+
762
+ Every observable event — startup banner (version, PID, VSP binary), destination discovery, relay activation, VSP session initialization, each JSON-RPC request with its id, every tool call with duration and outcome, self-healing restarts, and errors — is logged twice: to **stderr** with ISO timestamps (visible when the server runs in a terminal or in hosts that surface stderr), and to the host's **MCP server output channel** as standard `notifications/message` log notifications (VS Code/BAS and Claude Code render these under the server's output). Log notifications start at `info`; send `logging/setLevel` with `debug` (or higher) from the client to adjust what reaches the channel — stderr always receives everything. Credentials, cookies, and tokens are redacted in both streams.
763
+
757
764
  <a id="troubleshooting"></a>
758
765
 
759
766
  ## 🩺 Troubleshooting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sap-ai-dev-toolkit",
3
- "version": "0.4.5",
3
+ "version": "0.5.5",
4
4
  "description": "SAP AI development toolkit for BAS, ABAP, RAP, CAP, HANA Cloud, Fiori, UI5, and MCP",
5
5
  "author": "Gurkan Yilmaz",
6
6
  "type": "module",
@@ -11,6 +11,7 @@ import { ReadStream as TTYReadStream, WriteStream as TTYWriteStream } from 'node
11
11
  import { homedir } from 'node:os';
12
12
  import { colorText, formatStatus } from '../src/terminal-ui.mjs';
13
13
  import { brandedEnvValue, withBrandedEnvironment } from '../src/branding.mjs';
14
+ import { generatedServerName } from '../src/mcp-config.mjs';
14
15
 
15
16
  const root = dirname(dirname(fileURLToPath(import.meta.url)));
16
17
  const pkg = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'));
@@ -129,7 +130,7 @@ export function destinationTable(destinations, registeredNames) {
129
130
  const headings = ['Destination', 'Source', 'Client', 'Authentication', 'ADT probe', 'MCP server'];
130
131
  const rows = destinations.map(destination => {
131
132
  const probe = probeCell(destination);
132
- const registered = registeredNames.has(destination.serverName || destination.name);
133
+ const registered = registeredNames.has(generatedServerName(destination.serverName || destination.name));
133
134
  const source = destination.source === 'cloud-foundry'
134
135
  ? `CF ${destination.cf?.destinationInstanceName || 'unknown instance'}`
135
136
  : 'BAS';
@@ -178,7 +179,7 @@ async function announceSetup(result) {
178
179
 
179
180
  const selected = result.selected || [];
180
181
  const destinationsByServer = new Map(selected.map(destination => [
181
- destination.serverName || destination.name,
182
+ generatedServerName(destination.serverName || destination.name),
182
183
  destination
183
184
  ]));
184
185
  const registeredNames = new Set(servers.map(([name]) => name));
@@ -15,6 +15,12 @@ const UNSAFE = new Set(['POST', 'PUT', 'PATCH', 'DELETE']);
15
15
  // Set-Cookie state SAP returned alongside it and replays both on the unsafe
16
16
  // request. Without this pairing SAP sees a token from a foreign session and
17
17
  // answers "CSRF token validation failed" with HTTP 403.
18
+ // Tokens are session-scoped, not path-scoped, but SAP only issues them from
19
+ // GET-capable endpoints. POST-only services (ADT data preview among them)
20
+ // answer a same-path token fetch with 4xx, so the relay always fetches from
21
+ // the GET-friendly discovery endpoint and accepts that session's token for
22
+ // unsafe requests to any path.
23
+ const CSRF_FETCH_PATH = '/sap/bc/adt/discovery';
18
24
  const TOKEN_TTL_MS = 15 * 60 * 1000;
19
25
  const DEFAULT_MAX_TOKEN_FAILURES = 3;
20
26
  const MAX_CONFIGURED_TOKEN_FAILURES = 10;
@@ -133,7 +139,16 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
133
139
  // must keep the BAS .dest route (and its Cloud Connector mapping), so they
134
140
  // use HTTP CONNECT through the BAS proxy instead of credentials.host.
135
141
  const directBase = directHost ? new URL(String(directHost)) : null;
136
- const cookieBase = directBase || (destination.backendUrl ? new URL(String(destination.backendUrl)) : base);
142
+ const cookieBase = directBase || (destination.backendUrl
143
+ ? new URL(String(destination.backendUrl))
144
+ : (() => {
145
+ const target = new URL(base);
146
+ // BAS .dest URLs are local HTTP routing aliases for SAP backends that
147
+ // are commonly HTTPS. Use a secure cookie context when BAS metadata
148
+ // omits the backend URL so Secure session cookies are not discarded.
149
+ if (target.protocol === 'http:' && /\.dest$/i.test(target.hostname)) target.protocol = 'https:';
150
+ return target;
151
+ })());
137
152
  if (directBase) log(`[${destination.name}] BAS relay direct connect active (${directBase.origin}); BAS proxy cookie stripping bypassed`);
138
153
  if (tunnelMode) log(`[${destination.name}] BAS relay using a BAS proxy tunnel for the OnPremise destination`);
139
154
  // Proxy resolution: an explicitly configured proxy wins (an explicit empty
@@ -191,10 +206,10 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
191
206
  return send(target, method, headers, body);
192
207
  }
193
208
 
194
- async function fetchTokenFresh(requestUrl, requestHeaders) {
195
- const key = requestUrl.pathname;
209
+ async function fetchTokenFresh(requestHeaders) {
210
+ const key = CSRF_FETCH_PATH;
196
211
  stats.csrfFetches += 1;
197
- const target = resolveTarget(requestUrl);
212
+ const target = resolveTarget(new URL(CSRF_FETCH_PATH, base));
198
213
  const cookieTarget = resolveCookieTarget(target);
199
214
  const jar = copyCookieJar(sharedCookieJar);
200
215
  await seedRequestCookies(jar, requestHeaders.cookie, cookieTarget);
@@ -220,13 +235,13 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
220
235
  return session;
221
236
  }
222
237
 
223
- async function fetchToken(requestUrl, requestHeaders = {}) {
224
- const key = requestUrl.pathname;
238
+ async function fetchToken(requestHeaders = {}) {
239
+ const key = CSRF_FETCH_PATH;
225
240
  const cached = tokenCache.get(key);
226
241
  if (cached && Date.now() - cached.fetchedAt < TOKEN_TTL_MS) return cached;
227
242
  const pending = tokenFetches.get(key);
228
243
  if (pending) return pending;
229
- const fetching = fetchTokenFresh(requestUrl, requestHeaders);
244
+ const fetching = fetchTokenFresh(requestHeaders);
230
245
  tokenFetches.set(key, fetching);
231
246
  try {
232
247
  return await fetching;
@@ -235,14 +250,17 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
235
250
  }
236
251
  }
237
252
 
238
- async function probeCsrfSession(path = '/sap/bc/adt/discovery') {
239
- const requestUrl = new URL(path, base);
240
- const session = await fetchToken(requestUrl, { accept: 'application/xml,text/xml,*/*' });
253
+ async function probeCsrfSession() {
254
+ const session = await fetchToken({ accept: 'application/xml,text/xml,*/*' });
241
255
  return {
242
256
  httpStatus: session?.httpStatus || 0,
243
257
  tokenReceived: Boolean(session?.token),
244
258
  cookieCount: session?.cookieCount || 0,
245
- sessionUsable: Boolean(session?.token && session.cookieCount > 0)
259
+ // A token alone makes unsafe requests viable: BAS proxy routes deliver
260
+ // tokens but strip cookies, and the backend accepts the token on the
261
+ // proxy-established Basic-auth session. cookieCount stays reported for
262
+ // diagnosis; setup's override validation requires cookies separately.
263
+ sessionUsable: Boolean(session?.token)
246
264
  };
247
265
  }
248
266
 
@@ -262,7 +280,9 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
262
280
  async function forward(method, requestUrl, requestHeaders, body, session) {
263
281
  const target = resolveTarget(requestUrl);
264
282
  const cookieTarget = resolveCookieTarget(target);
265
- const sessionCookie = session?.jar ? await cookieHeader(session.jar, cookieTarget) : undefined;
283
+ const cookieJar = session?.jar || sharedCookieJar;
284
+ if (!session) await seedRequestCookies(cookieJar, requestHeaders.cookie, cookieTarget);
285
+ const sessionCookie = await cookieHeader(cookieJar, cookieTarget);
266
286
  const headers = authHeaders(headersFrom(requestHeaders, {
267
287
  ...(session?.token ? { 'x-csrf-token': session.token } : {}),
268
288
  ...(sessionCookie ? { cookie: sessionCookie } : {})
@@ -280,26 +300,32 @@ export function createBasDestinationRelay(destination, { env = process.env, fetc
280
300
  // a failing destination from looping forever.
281
301
  async function forwardWithRetry(method, requestUrl, requestHeaders, body, failures = 0) {
282
302
  const unsafe = UNSAFE.has(method);
283
- const session = unsafe ? await fetchToken(requestUrl, requestHeaders) : null;
284
- if (unsafe && (!session?.token || !session.cookieCount)) {
303
+ const session = unsafe ? await fetchToken(requestHeaders) : null;
304
+ if (unsafe && !session?.token) {
285
305
  stats.csrfSessionFailures += 1;
286
- const detail = !session?.token
287
- ? 'could not obtain a CSRF token'
288
- : 'received a CSRF token without a session cookie';
289
- const message = `BAS destination relay ${detail} for ${requestUrl.pathname}; no unsafe request was sent`;
306
+ const message = `BAS destination relay could not obtain a CSRF token for ${requestUrl.pathname}; no unsafe request was sent`;
290
307
  log(`[${destination.name}] ${message}`);
291
- const response = new Response(message, { status: 503, headers: { 'content-type': 'text/plain; charset=utf-8' } });
308
+ const status = session?.httpStatus >= 400 ? session.httpStatus : 503;
309
+ const response = new Response(message, { status, headers: { 'content-type': 'text/plain; charset=utf-8' } });
292
310
  return { response, body: Buffer.from(message) };
293
311
  }
312
+ // A token without cookies is still sent: BAS proxy routes deliver tokens
313
+ // but strip Set-Cookie, and the backend accepts the token on the Basic-
314
+ // auth session the proxy establishes per hop. A retry cannot help there
315
+ // (a fresh token still arrives cookie-less), so a CSRF rejection on a
316
+ // cookie-less session is surfaced instead of retried.
317
+ const tokenOnly = unsafe && !session.cookieCount;
294
318
  const { response, body: responseBody } = await forward(method, requestUrl, requestHeaders, body, session);
295
319
  const rejected = csrfFailure(response.status, response.headers, responseBody);
296
- if (unsafe && rejected && failures < maxFailures) {
320
+ if (unsafe && rejected && !tokenOnly && failures < maxFailures) {
297
321
  log(`[${destination.name}] BAS relay CSRF session rejected for ${requestUrl.pathname}; re-establishing token and session (attempt ${failures + 1}/${maxFailures})`);
298
322
  stats.csrfRetries += 1;
299
- tokenCache.delete(requestUrl.pathname);
323
+ tokenCache.delete(CSRF_FETCH_PATH);
300
324
  return forwardWithRetry(method, requestUrl, requestHeaders, body, failures + 1);
301
325
  }
302
- if (unsafe && rejected && failures >= maxFailures) {
326
+ if (unsafe && rejected && tokenOnly) {
327
+ log(`[${destination.name}] BAS relay CSRF token rejected without a session cookie for ${requestUrl.pathname}; not retried (route delivers no cookies; a credential override enables a paired session)`);
328
+ } else if (unsafe && rejected && failures >= maxFailures) {
303
329
  log(`[${destination.name}] BAS relay stopped after ${maxFailures} CSRF session retries for ${requestUrl.pathname}`);
304
330
  }
305
331
  return { response, body: responseBody };