Build a Lightning App
Build an Agent
Add Images and Brands to your React App (Beta)
Add Agentforce Conversation Client to Your React App
Validate and Optimize React Apps (Developer Preview)
Create Projects
Agentforce Vibes provides several Model Context Protocol (MCP) tools that orchestrate a quality validation workflow for Salesforce Multi-Framework. The validation workflow runs a set of validators and reports the results to help you get your apps ready for production. After the results are returned, the workflow stops so you can choose whether to fix the identified issues or revalidate.
These tools are available via the Salesforce DX MCP server in the experts-validation toolset.
validate_and_optimizescore_issuesTo invoke the validation tools, ask about validating your React app. Example prompts include:
componentNamevalidate_and_optimize on this component for accessibility onlyThe validate_and_optimize tool scores code quality across multiple validators:
run_code_analyzerguide_lws_securityguide_component_accessibilityEach validator runs and invokes the score_issues tool, producing a readiness score (0–100) and a quality grade. After all validators run, score_issues returns the overall score.
Validators are weighted by importance — security issues impact the overall score far more than best-practice issues.
Note
Use this tool for React apps:
The score_issues tool consumes the validation findings from validate_and_optimize. The validate_and_optimize tool invokes each validator to run an analysis and then calls score_issues. After all validators are run, score_issues provide an overall readiness score.
score_issues computes a readiness score (0-100) and a quality grade (prototype, draft, review-for-production). You get a list of identified issues with recommendations on how to fix them. You can choose to fix them automatically and re-validate your component.
| Grade | Score | Meaning |
|---|---|---|
review-for-production | ≥ 90 | Ready for human review |
prototype | 60–89 | Functional but has notable issues |
draft | < 60 | Significant issues need addressing |
An issue in your code can be identified as an error, warning, or note. Each issue results in points taken off from the total score.
| Finding | Score | Points Lost |
|---|---|---|
| 1 error | 80 | −20 |
| 1 warning | 96 | −4 |
| 1 note | 100 | ~0 |
Aggregate scoring uses a weighted average across all the validators, weighted based on tier.
| Tier | Weight | Validators |
|---|---|---|
| Blocker | 50 | guide_lws_security |
| Critical | 30 | run_code_analyzer |
| Important | 20 | guide_component_accessibility |
For example, a single security error alone can drop the overall score from 100 to 93.
The validate_and_optimize tool invokes several validators and returns issues per validator before presenting the results and a readiness score with actionable recommendations.
The run_code_analyzer MCP tool runs static analysis across selected files to detect code quality, security, and performance issues. The tool returns a JSON result with a path to the results file (if created) and an overall status.
The run_code_analyzer tool complements npm run lint (ESLint) and npm run build (TypeScript and Vite). It adds a static-analysis layer, such as for security, performance, or anti-patterns beyond ESLint rules.
The tool checks for code issues, including:
ESLint (JavaScript/TypeScript linting)
PMD (Apex and JavaScript patterns)
CPD (Copy and Paste Detector)
Configure the Code Analyzer tool to ignore eslint.config.js. For more information, see Customize the Configuration in the Salesforce Code Analyzer Developer Guide.
Note
The guide_component_accessibility tool analyzes component accessibility and provides fixes and guidance that are aligned to WCAG and Salesforce standards. It analyzes your code in accessibility areas such as roles, labels, focus management, color contrast, and ARIA patterns. If you have images in your component, the tool provides recommendations for images, such as for alt text quality, decorative vs informative, and contrast with imagery.
In analysis mode, the tool returns a list of identified violations, and it asks for your permission to apply the fixes. In fix mode, the tool applies the fixes and provides an accessibility fix report with the identified issues.
The tool checks for accessibility issues, including:
The guide_lws_security tool provides a comprehensive security analysis aligned with Lightning Web Security (LWS) and product security guidelines. The tool identifies risky browser patterns, DOM access, sandbox escapes, unsafe script/style injection, and common anti-patterns in your React code.
The tool checks for security issues, including:
Function constructor, and blob URLs for scripts