Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Next Best Action Strategy

sf_create_next_best_action
Idempotent

Create a Salesforce Next Best Action strategy that defines contextual recommendations with accept/decline actions for use on record pages, communities, and chatbots.

Instructions

Creates a Next Best Action (NBA) recommendation strategy (RecommendationStrategy metadata type). NBA strategies surface contextual recommendations to agents and customers on record pages, communities, and chatbots.

A strategy defines:

  • contextObjectApiName: the record type that provides context (e.g. 'Account', 'Case', 'Opportunity')

  • recommendations: a list of actions the agent can offer, each with Accept/Decline buttons and an optional Flow to execute on acceptance

NBA strategies can be displayed via:

  • Einstein Next Best Action component on a Lightning Record Page

  • OmniScripts and FlexCards

  • Service Console

After creating, add the "Einstein Next Best Action" Lightning component to a record page and configure it to use this strategy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesStrategy display label
descriptionNoStrategy description
strategyNameYesStrategy API name
recommendationsNoRecommendation definitions
contextObjectApiNameNoObject that provides context, e.g. 'Account', 'Case'
Behavior4/5

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

Annotations already indicate readOnlyHint=false and idempotentHint=true, and the description adds substantial context about what the tool creates, the structure of a strategy, and how it is displayed. It does not disclose permission requirements or potential side effects, but the annotation coverage reduces the burden; the description goes beyond the annotations by explaining the strategy's components.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with the core purpose. It uses bullet-like lines for the strategy definition and display options, making it scannable. Each sentence adds necessary context for understanding the NBA strategy, and there is no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool creates a complex metadata type, and the description covers the key aspects: what it is, main components, where it can be displayed, and next steps after creation. It does not describe return values (no output schema) or permission requirements, but for a create tool with strong schema and annotation support, the description is sufficient for an agent to understand and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each parameter is already described. The description adds extra meaning by explaining the purpose of key parameters: it defines contextObjectApiName as the record type providing context (e.g., 'Account', 'Case') and explains that recommendations come with Accept/Decline buttons and an optional Flow to execute on acceptance. This enriches the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Creates a Next Best Action (NBA) recommendation strategy (RecommendationStrategy metadata type).' This clearly distinguishes the tool from sibling creation tools by naming the exact metadata type and providing a concrete example of what it does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool by detailing how NBA strategies surface recommendations on record pages, communities, and chatbots, and lists supported display contexts (Einstein component, OmniScripts, FlexCards, Service Console). It also includes a post-creation step (adding the Lightning component), giving a clear usage scenario. However, it does not explicitly state when not to use it or compare to alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/semwalajay83-sem/salesforce-metadata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server