Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create OmniStudio FlexCard

sf_create_flexcard
Idempotent

Create an OmniStudio FlexCard to display contextual data on Lightning pages and Experience Cloud sites. Configure data source, fields, actions, and states; the card is created inactive.

Instructions

Creates an OmniStudio FlexCard (OmniUiCard metadata type). FlexCards display contextual data on Lightning pages and Experience Cloud sites.

A FlexCard defines:

  • A data source (SOQL query, DataRaptor, Integration Procedure, Apex, or None)

  • Fields to display from the data source

  • Actions the user can take (navigate, launch OmniScript, open URL, start Flow)

  • States (card variations based on data conditions)

The card is created in inactive state. Use sf_activate_flexcard to activate it after creation.

dataSourceType options:

  • SOQL: provide a dataSourceName with a SOQL query string

  • DataRaptor: provide the DataRaptor interface name

  • IntegrationProcedure: provide the Integration Procedure key (Type_SubType)

  • Apex: provide the Apex class name

  • None: no data source (static card)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesHuman-readable label
fieldsNoFields to display on the card
statesNoConditional states
actionsNoCard actions
cardNameYesAPI name of the FlexCard (OmniUiCard)
descriptionNo
objectApiNameNoPrimary SObject, e.g. 'Account'
dataSourceNameNoSOQL query, DataRaptor name, or Integration Procedure name
dataSourceTypeNoSOQL
Behavior4/5

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

Annotations indicate a non-read-only, non-destructive, and idempotent operation. The description adds that the card is created in an inactive state, which is vital for lifecycle expectations. It also describes the components (data source, fields, actions, states) that affect behavior, though it does not disclose conflict or overwrite behavior, which is partially mitigated by the idempotentHint.

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 with a summary, conceptual breakdown, lifecycle note, and bulleted list of dataSourceType options. It is front-loaded with the core purpose and each section earns its place without redundancy or 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?

For a creation tool with 9 parameters and no output schema, the description covers the most critical context: data source selection, component parts, and the inactive-creation lifecycle. It could add return-value expectations or error scenarios, but the existing guidance is sufficient for an agent familiar with FlexCards. The activation pointer and data source semantics fill the most significant gaps.

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

Parameters5/5

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

The description provides explicit mapping between dataSourceType and dataSourceName, which is not evident from the schema alone. It clarifies that SOQL expects a query string, DataRaptor an interface name, IntegrationProcedure a key, Apex a class name, and None requires no data source. This significantly enhances the schema's 78% coverage and fixes ambiguous schema text.

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 'Creates an OmniStudio FlexCard (OmUiCard metadata type)', clearly identifying the resource and the create action. It distinguishes from siblings like sf_update_flexcard and sf_activate_flexcard by specifying the create scope and noting the card is initially created in an inactive state.

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 this tool by detailing the FlexCard creation context and its lifecycle. It explicitly directs activation to sf_activate_flexcard after creation, but it does not include when-not-to-use or comparisons with other creation tools. The dataSourceType options provide clear usage guidance for selecting the correct source configuration.

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