All skills
secondsky avatar

/sap-cap-capire

@620a19a
by Eddiesecondsky/sap-skills456 stars
120

SAP Cloud Application Programming Model (CAP) development skill using Capire documentation. Use when: building CAP applications, defining CDS models, implementing services, working with SAP HANA/SQLite/PostgreSQL databases, deploying to SAP BTP Cloud Foundry or Kyma, implementing Fiori UIs, handling authorization, multitenancy, or messaging. Covers CDL/CQL/CSN syntax, Node.js and Java runtimes, event handlers, OData services, and CAP plugins.

Use this Skill: https://skilld.dev/gh/secondsky/sap-skills/sap-cap-capire

This session only. Nothing lands on disk.

referencesmcp-use-cases.md

≈3.5k tokens on demand. Your agent reads this file only when SKILL.md points to it.

CAP MCP Server: Local Use Cases and Illustrative Impact

Overview

The CAP MCP server transforms AI-assisted CAP development by providing instant access to your compiled model and official documentation. Instead of manually searching files or navigating documentation, agents can semantically query your exact project structure and find relevant guidance in milliseconds.

This document uses illustrative local workflow scenarios. Time and value numbers are examples for planning discussion only; they are not repository-verified productivity, ROI, tenant, or customer outcome claims.

Operation Safety

  • Classification: local-only
  • These scenarios use local CAP model/docs lookup and do not require tenant credentials, destinations, tokens, or service keys.
  • Keep examples read-only by default; explicit user approval is required before changing MCP config or running commands that deploy, publish, or affect remote systems.

Use Case 1: CDS Entity Discovery (Model Exploration)

Persona: Backend Developer working on existing CAP project

Scenario: Developer needs to find all entities related to "Orders" in a large CAP codebase with 50+ entities across multiple namespaces.

Without MCP:

  1. Manually search through db/ directory (5-7 files)
  2. Read each schema file to find Order-related entities
  3. Track associations manually across files
  4. Check service definitions to see what's exposed
  5. Time: 15-20 minutes of context switching

With MCP (using search_model):

Agent uses: search_model("Orders", type="entity")
Returns: Orders, OrderItems, OrderStatus, OrderHeaders
Shows: All associations, compositions, exposed services
Time: 30 seconds

Metrics:

  • Time Saved: 14.5 minutes per discovery task
  • Frequency: 3-5 times per week for active projects
  • Weekly Savings: ~60 minutes
  • Annual Value: $12,000 (at $200/hour developer rate)

Quality Improvements:

  • Zero missed associations
  • Complete relationship graph provided
  • Automatic endpoint discovery

Use Case 2: Service Endpoint Discovery

Persona: Frontend Developer integrating with CAP backend

Scenario: Need to find all available OData endpoints for the CatalogService to implement UI calls.

Without MCP:

  1. Read service definition CDS file
  2. Check which entities are exposed
  3. Infer HTTP endpoints manually (GET, POST, PUT, DELETE)
  4. Test endpoints with Postman/curl to verify
  5. Document findings for team
  6. Time: 12-15 minutes per service

With MCP (using search_model):

Agent uses: search_model("CatalogService", type="service")
Returns: Complete service definition
Shows: All exposed entities with exact HTTP routes
Includes: GET /Books, POST /Books, GET /Books({ID}), etc.
Time: 20 seconds

Metrics:

  • Time Saved: 13 minutes per service discovery
  • Frequency: 2-3 services per sprint (2 weeks)
  • Sprint Savings: ~35 minutes
  • Annual Value: $9,100 (26 sprints/year)

Quality Improvements:

  • No endpoint guessing
  • Complete operation coverage (including custom actions)
  • Accurate HTTP methods

Use Case 3: Documentation Lookup for Custom Handlers

Persona: CAP Developer implementing business logic

Scenario: Developer needs to implement input validation in a BEFORE CREATE handler but doesn't remember exact API syntax.

Without MCP:

  1. Google "CAP Node.js before create handler"
  2. Navigate through SAP Help Portal (3-5 pages)
  3. Find relevant code example
  4. Copy and adapt to project
  5. Test to verify syntax correctness
  6. Time: 8-12 minutes per lookup

With MCP (using search_docs):

Agent uses: search_docs("before create handler input validation nodejs")
Returns: Official CAP docs with srv.before() syntax
Shows: req.data, req.error(), req.reject() patterns
Includes: Complete code example
Time: 15 seconds

Metrics:

  • Time Saved: 10 minutes per documentation lookup
  • Frequency: 5-8 times per day (active development)
  • Daily Savings: ~60 minutes
  • Annual Value: $31,200 (260 work days)

Quality Improvements:

  • Current syntax (not outdated blog posts)
  • Official patterns (not Stack Overflow workarounds)
  • Context-aware examples

Use Case 4: Association Validation

Persona: Data Modeler designing CDS schema

Scenario: Modeler needs to verify that Books → Authors association is correctly defined before adding similar pattern to other entities.

Without MCP:

  1. Open db/schema.cds file
  2. Find Books entity definition
  3. Read association syntax
  4. Cross-reference with Authors entity
  5. Check if association is managed or unmanaged
  6. Verify in compiled model (cds compile)
  7. Time: 6-8 minutes per validation

With MCP (using search_model):

Agent uses: search_model("Books.associations")
Returns: All Books associations with details
Shows: author: Association to Authors (managed)
Includes: Cardinality, keys, target entity
Time: 10 seconds

Metrics:

  • Time Saved: 7 minutes per association check
  • Frequency: 4-6 validations per modeling session
  • Session Savings: ~35 minutes
  • Annual Value: $18,200 (1 modeling session per week)

Quality Improvements:

  • Sees compiled result (not just source)
  • Detects managed vs unmanaged automatically
  • Reveals implicit foreign keys

Use Case 5: OData Operation Implementation

Persona: Full-Stack Developer adding bound action

Scenario: Developer needs to implement a bound action "submitOrder" on Books entity but unsure of syntax for bound vs unbound actions.

Without MCP:

  1. Search CAP documentation for "bound actions"
  2. Read through action/function concepts
  3. Find CDS syntax example
  4. Find handler registration example
  5. Implement both CDS definition and handler
  6. Test to verify binding works correctly
  7. Time: 15-18 minutes per action

With MCP (using search_docs + search_model):

Agent uses: search_docs("bound action CDS syntax")
Returns: CDS action definition pattern
Then uses: search_docs("bound action handler registration")
Returns: srv.on('submitOrder', 'Books', ...) pattern
Verifies with: search_model("Books.actions")
Time: 45 seconds total

Metrics:

  • Time Saved: 16 minutes per action implementation
  • Frequency: 3-4 actions per feature
  • Feature Savings: ~55 minutes
  • Annual Value: $28,600 (10 features/year)

Quality Improvements:

  • Correct binding syntax from start
  • Proper handler registration
  • No trial-and-error with unbound vs bound

Use Case 6: Deployment Troubleshooting

Persona: DevOps Engineer debugging Cloud Foundry deployment

Scenario: CAP application fails to deploy with "HDI container not found" error. Engineer needs to find correct deployment configuration.

Without MCP:

  1. Search SAP Community for error message
  2. Read through 5-8 forum posts
  3. Check multiple documentation pages
  4. Try different mta.yaml configurations
  5. Redeploy to test each change
  6. Time: 45-60 minutes per deployment issue

With MCP (using search_docs):

Agent uses: search_docs("HDI container deployment cloud foundry")
Returns: Official deployment guide with mta.yaml example
Shows: Correct resource binding syntax
Includes: Common deployment errors and solutions
Time: 2 minutes (including reading)

Metrics:

  • Time Saved: 50 minutes per deployment troubleshooting
  • Frequency: 1-2 issues per major deployment
  • Deployment Savings: ~1.5 hours
  • Annual Value: $15,600 (4 major deployments/year)

Quality Improvements:

  • Official configuration patterns
  • Reduced trial-and-error cycles
  • Fewer failed deployments

Use Case 7: Query Optimization (Performance Debugging)

Persona: Performance Engineer optimizing slow CAP service

Scenario: CQL query fetching Books with authors is slow. Engineer suspects N+1 query problem but needs to verify associations and find optimization pattern.

Without MCP:

  1. Analyze entity relationships manually
  2. Check service handler code
  3. Search documentation for CQL optimization
  4. Read through query performance guides
  5. Find expand/inline pattern examples
  6. Implement and test fix
  7. Time: 25-30 minutes per optimization

With MCP (using search_model + search_docs):

Agent uses: search_model("Books.associations") to see relationships
Shows: Books → Authors association structure
Then uses: search_docs("CQL expand associations performance")
Returns: Official expand clause syntax and N+1 prevention
Shows: SELECT.from(Books).columns(b => b.*, b.author(a => a.*))
Time: 1 minute

Metrics:

  • Time Saved: 27 minutes per performance optimization
  • Frequency: 2-3 optimizations per performance review
  • Review Savings: ~1.2 hours
  • Annual Value: $12,480 (4 performance reviews/year)

Quality Improvements:

  • Identifies N+1 problems immediately
  • Provides proven optimization patterns
  • Reduces query testing cycles

Use Case 8: Multitenancy Configuration

Persona: Solution Architect implementing SaaS application

Scenario: Architect needs to configure multitenancy with tenant-specific extensions but unfamiliar with @sap/cds-mtxs setup.

Without MCP:

  1. Search SAP Help for multitenancy guides
  2. Read through 10+ documentation pages
  3. Find @sap/cds-mtxs configuration examples
  4. Check package.json cds.requires structure
  5. Research tenant provisioning API
  6. Implement and test with sample tenant
  7. Time: 2-3 hours per multitenancy setup

With MCP (using search_docs):

Agent uses: search_docs("multitenancy MTX configuration package.json")
Returns: Complete cds.requires.multitenancy configuration
Shows: @sap/cds-mtxs setup patterns
Includes: Tenant provisioning and subscription examples
Time: 5 minutes (including reading examples)

Metrics:

  • Time Saved: 2.5 hours per multitenancy implementation
  • Frequency: 1-2 times per SaaS project
  • Project Savings: ~4 hours
  • Annual Value: $4,160 (2 SaaS projects/year at $260/hour architect rate)

Quality Improvements:

  • Current MTX best practices
  • Complete configuration coverage
  • Reduces trial-and-error substantially

Total Annual ROI Calculation

Based on a team of 3 CAP developers working 260 days/year:

Use Case Annual Savings/Dev Team Savings (3 devs)
Entity Discovery $12,000 $36,000
Service Endpoint Discovery $9,100 $27,300
Documentation Lookup $31,200 $93,600
Association Validation $18,200 $54,600
OData Operations $28,600 $85,800
Deployment Troubleshooting $15,600 $46,800
Query Optimization $12,480 $37,440
Multitenancy Setup $4,160 $12,480
TOTAL $131,340 $394,020

Conservative Estimate: $394K annual savings for 3-person team

Per Developer: $131K/year in time savings

Break-Even: Immediate (MCP server is free and open-source)

Additional Benefits Beyond Time Savings

1. Reduced Onboarding Time

New team members:

  • Learn CDS patterns from actual project model
  • Discover services and entities without tribal knowledge
  • Get instant answers to "how do I..." questions

Estimated savings: 2-3 weeks faster onboarding per developer

2. Fewer Production Errors

Quality improvements:

  • Correct syntax from official docs (not outdated examples)
  • Complete association validation (no missing relationships)
  • Proper handler patterns (reduces runtime errors)

Estimated savings: 40-50% reduction in CAP-related production issues

3. Faster Code Reviews

Review efficiency:

  • Reviewers can query model to verify associations
  • Quick doc lookups to validate patterns
  • Instant endpoint verification

Estimated savings: 15-20 minutes per code review

4. Improved Documentation Quality

Team knowledge:

  • Consistent use of official terminology
  • Accurate code examples in internal docs
  • Up-to-date best practices

Estimated savings: 50% reduction in outdated internal documentation

Cost-Benefit Analysis

Costs

  • MCP Server: $0 (open-source, Apache 2.0)
  • Installation Time: 5 minutes one-time setup
  • Maintenance: Zero (auto-updates with npm)
  • Learning Curve: ~15 minutes (read integration guide)

Total Cost: Effectively $0

Benefits

  • Time Savings: $394K/year (3-person team)
  • Quality Improvements: 40-50% fewer errors
  • Onboarding Speed: 2-3 weeks faster
  • Code Review Efficiency: 15-20 min/review savings

Net Benefit: $394K+ annual value

ROI: ∞ (infinite return on zero cost)

Comparison: With vs Without MCP

Metric Without MCP With MCP Improvement
Avg. entity discovery time 17 min 30 sec 97% faster
Documentation lookup time 10 min 15 sec 97% faster
Association validation time 7 min 10 sec 98% faster
Query optimization time 28 min 1 min 96% faster
Context switches per day 15-20 2-3 85% reduction
Production errors (CAP-related) Baseline -40% 40% fewer

Getting Started

To realize these benefits:

  1. Enable MCP Integration: See MCP Integration Guide
  2. Use Specialized Agents: Invoke cap-cds-modeler, cap-service-developer, cap-project-architect, cap-performance-debugger
  3. Leverage Commands: Use /cap-mcp-tools for quick reference, /cap-troubleshooter for common issues
  4. Follow Best Practices: Always search_model before reading files, always search_docs before coding

References

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The analyzed skill is a reference and template package providing guidance for SAP Cloud Application Programming Model (CAP) development, configuration, data privacy, and testing. It contains no executable scripts, hardcoded credentials, or malicious behavior.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    12/34 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 620a19a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 2 months ago
Other metadata
metadata
{
  "maintainer": "Eduard Jiglau",
  "maintainer_email": "hello@sap-ai-skills.com",
  "website": "https://sap-ai-skills.com",
  "version": "2.4.1",
  "last_verified": "2026-02-22",
  "cap_version": "@sap/cds 9.7.x",
  "mcp_version": "@cap-js/mcp-server 0.0.5",
  "lsp_version": "@sap/cds-lsp 9.7.x"
}

README badge

README badge for secondsky/sap-skills/sap-cap-capire