Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Salesforce Custom Field

sf_create_custom_field
Idempotent

Create custom fields on any Salesforce object with various types like Text, Number, Picklist, and Lookup, while ensuring API names end with '__c'.

Instructions

Creates a new custom field on an existing Salesforce object. The field API name must end with '__c'. Supports all field types: Text, Number, Picklist, Lookup, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesSalesforce field type
labelYesDisplay label for the field, e.g. 'Status'
scaleNoDecimal places for Number/Currency/Percent (0–17)
lengthNoMax length. Text/TextArea: 1–255 (default 255). LongTextArea/Html (Text Area Long / Rich Text Area): 256–131072 (default 32768).
uniqueNoWhether values must be unique (Text, Number, Email)
requiredNoWhether the field is required on page layouts
fieldNameYesAPI name of the field, e.g. 'Status__c'
precisionNoTotal digits for Number/Currency/Percent (1–18)
externalIdNoWhether this field is an external ID
objectNameYesAPI name of the parent object, e.g. 'Account' or 'Invoice__c'
descriptionNoOptional description for the field
referenceToNoTarget object API name for Lookup/MasterDetail, e.g. 'Account'
defaultValueNoDefault value for the field. Use true/false for Checkbox fields.
visibleLinesNoVisible lines. Required for LongTextArea and Html (Text Area Long / Rich Text Area) — default 10. Also used for MultiselectPicklist.
picklistValuesNoPicklist configuration. Required for Picklist / MultiselectPicklist types.
deleteConstraintNoDelete behaviour for Lookup fields: 'Cascade', 'Restrict', or 'SetNull'
relationshipNameNoAPI name for the relationship (no spaces)
relationshipLabelNoLabel for the relationship on the related object
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, covering the mutation safety profile. The description adds only the '__c' naming rule and 'existing object' scope, which are also present in the schema or purpose, so it contributes little new behavioral context.

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 two sentences, front-loaded with the core action, and avoids redundant detail already present in annotations or schema. It is appropriately succinct.

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

Completeness2/5

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

With 18 parameters, nested objects, and type-specific requirements, the description is far too sparse. It fails to warn that Picklist requires picklistValues, Lookup/MasterDetail requires referenceTo, or that Number fields need precision/scale. No output schema exists, so the description should help guide correct invocation; it does not.

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 the baseline is 3. The description repeats the '__c' suffix (already in fieldName's pattern) and lists field types (already in the type enum), adding no new meaning beyond the structured schema.

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 creates a custom field on an existing Salesforce object, using a specific verb and resource. It distinguishes itself from sibling tools like sf_create_custom_object by focusing on fields, and the '__c' suffix constraint adds precision.

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 it is the general tool for creating custom fields ('Supports all field types') but does not explicitly mention when to use it versus specialized alternatives like sf_create_formula_field or sf_add_picklist_values. No exclusions or alternative references are provided.

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