Skip to main content
Glama
pratapsfdc22-dev

Salesforce AI Agent MCP Server

salesforce_create_custom_field

Create custom fields on Salesforce objects using the Tooling API, supporting standard types like Text, Number, Picklist, and Lookup.

Instructions

Create a custom field on a Salesforce object using the Tooling API. Supports all standard field types including Text, Number, Picklist, Checkbox, Date, Lookup, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNoNumber of decimal places for Number/Currency/Percent fields (default 0)
lengthNoField length. For Text: 1–255 (default 255). For LongTextArea/RichTextArea: up to 131072 (default 32768). Not used for Date, Checkbox, etc.
uniqueNoWhether the field value must be unique (default false)
formulaNoFormula expression for Formula fields
requiredNoWhether the field is required (default false)
fieldTypeYesSalesforce field type. One of: Text, Number, Currency, Picklist, MultiSelectPicklist, Checkbox, Date, DateTime, Email, Phone, URL, TextArea, LongTextArea, RichTextArea, Lookup, MasterDetail, Percent, AutoNumber, Formula
precisionNoTotal number of digits for Number/Currency/Percent fields (default 18)
fieldLabelYesHuman-readable field label (e.g. 'Customer Tier')
objectNameYesSalesforce object API name (e.g. 'Account', 'My_Object__c')
descriptionNoInternal description of the field's purpose
referenceToNoTarget object API name for Lookup or MasterDetail fields (e.g. 'Account', 'My_Object__c'). Required for Lookup/MasterDetail types.
defaultValueNoDefault value for the field. For AutoNumber fields, this sets the display format (e.g. 'CASE-{000000}')
fieldApiNameYesField API name without the __c suffix (e.g. 'Customer_Tier'). The __c suffix will be added automatically.
visibleLinesNoNumber of visible lines for LongTextArea/RichTextArea fields (default 5)
inlineHelpTextNoHelp text shown to users in the UI
picklistValuesNoList of picklist values for Picklist or MultiSelectPicklist fields (e.g. ['High', 'Medium', 'Low'])
relationshipNameNoRelationship name for Lookup/MasterDetail fields. Auto-generated if not provided.
Behavior2/5

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

With no annotations, the description carries the full burden. It mentions 'using the Tooling API' but fails to disclose whether creation is immediate or staged, what permissions are needed, or what side effects might occur (e.g., field being unavailable until deployment). It also does not describe error behavior or impact on existing data.

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 two sentences long and front-loaded with the core purpose. The second sentence, however, ends with 'and more' which is redundant given the enum is exhaustive, making it slightly less crisp but still efficient.

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?

This is a complex creation tool with 17 parameters, 4 required, and no output schema. The description offers only a basic statement of intent and fails to explain what happens on success, how errors are reported, or how this fits into a broader Salesforce metadata lifecycle. Minimal for the tool's complexity.

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 coverage is 100% — all 17 parameters have descriptions in the input schema. The description's phrase 'Supports all standard field types including...' adds little beyond the schema's exhaustive enum. No additional parameter relationships or usage detail are provided in the description.

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 'Create a custom field on a Salesforce object using the Tooling API', using a specific verb + resource. This distinguishes it from sibling tools like salesforce_create_validation_rule (validation rule creation) and salesforce_get_object_fields (reading fields).

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool vs alternatives. It does not mention that this is for individual field creation rather than bulk deployment (salesforce_deploy_metadata), nor does it list any prerequisites or context for choosing this tool.

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/pratapsfdc22-dev/salesforce-ai-agent-mcp'

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