Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Formula Field

sf_create_formula_field
Idempotent

Create a formula field on any Salesforce object with full formula language support, including all return types, cross-object references, and complex multi-line formulas.

Instructions

Creates a formula field on any Salesforce object. Supports all return types (Text, Number, Currency, Date, DateTime, Checkbox, Percent) and the full Salesforce formula language: IF/AND/OR/NOT, BLANKVALUE, TEXT, VALUE, DATE, DATEVALUE, TODAY, NOW, date functions (MONTH/YEAR/DAY), math (FLOOR/CEILING/MOD), string functions (LEN/LEFT/RIGHT/MID/TRIM/UPPER/LOWER/CONTAINS/BEGINS), record type and picklist functions (ISPICKVAL, ISNULL, ISBLANK), cross-object field references (e.g. Account.Owner.Name), and VLOOKUP. Complex multi-line formulas are fully supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesField label
scaleNoDecimal places for Number/Currency/Percent return types
formulaYesSalesforce formula expression. Supports all Salesforce formula functions: IF, AND, OR, NOT, BLANKVALUE, TEXT, VALUE, DATE, DATEVALUE, TODAY, NOW, MONTH, YEAR, DAY, FLOOR, CEILING, MOD, LEN, LEFT, RIGHT, MID, TRIM, UPPER, LOWER, CONTAINS, BEGINS, ISPICKVAL, ISNULL, ISBLANK, cross-object fields (e.g. Account.Owner.Name), etc.
fieldNameYesField name without __c suffix
precisionNoTotal number of digits for Number/Currency/Percent return types (default 18)
returnTypeYesFormula return type
descriptionNoField description
objectApiNameYesObject API name, e.g. 'Opportunity'
formulaTreatBlanksAsNoHow to treat blank fields in the formula. Defaults to BlankAsZero for numeric types, BlankAsLogicalFalse for Checkbox.
Behavior4/5

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

Annotations cover the safety profile (not read-only, not destructive, idempotent). The description adds valuable behavioral context beyond annotations, such as support for all return types, full formula language, cross-object references, and complex multi-line formulas. This helps the agent understand the tool's capabilities without contradicting annotations.

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

Conciseness4/5

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

The description is front-loaded with the purpose and then expands on capabilities. The second sentence is long but packed with specific useful details (function list, feature support). It is appropriately sized for a tool with complex capabilities, though slightly verbose.

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?

Given the tool's complexity, the description is fairly complete: it covers return types, formula language features, cross-object references, and multi-line support. It lacks explicit alternatives or prerequisites, but the rich schema and annotations fill in most gaps, making it adequately complete for an agent to use the tool correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so parameters are already well documented. The description adds context about supported formula functions and return types, but this largely overlaps with the schema's own parameter descriptions. It does not provide significant additional meaning beyond what the schema already covers.

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 clearly states the tool's function with a specific verb and resource: 'Creates a formula field on any Salesforce object.' It distinguishes itself from siblings like sf_create_custom_field by explicitly focusing on formula fields and enumerating supported return types and formula language features.

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

Usage Guidelines3/5

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

The description implies usage context: this tool is for creating formula fields. However, it does not explicitly state when to use this over alternatives (e.g., sf_create_custom_field for non-formula fields) or provide exclusions. The context is implied but not spelled out.

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