Skip to main content
Glama

Create a custom object

sf_create_custom_object

Creates a custom Salesforce object via Tooling API, deriving API name from label and adding a Name field. Requires MC_NEXT_ALLOW_METADATA_CHANGES=true.

Instructions

Create a custom object via the Tooling API (POST /tooling/sobjects/CustomObject). The API name is derived from label (or name) with a "__c" suffix. A Name field is created automatically unless you pass nameFieldType: "AutoNumber". Gated behind MC_NEXT_ALLOW_METADATA_CHANGES=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAPI name without the __c suffix, e.g. "Invoice". Defaults to a slug of the label.
labelYesSingular label, e.g. "Invoice".
descriptionNo
pluralLabelNoPlural label, e.g. "Invoices". Defaults to label + "s".
sharingModelNoOrg-wide default sharing. Default "ReadWrite".
nameFieldTypeNoType of the auto-created Name field. Default "Text".
nameFieldLabelNoLabel for the auto-created Name field.
nameFieldFormatNoDisplay format when nameFieldType is "AutoNumber", e.g. "INV-{0000}".
deploymentStatusNoDeployment status. Default "Deployed".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations available, the description carries the behavioral burden and does so well: it discloses the endpoint, the automatic '__c' suffix derivation, the auto-created Name field behavior, and the feature-flag gate. It lacks details about permissions or failure modes, but otherwise gives strong 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?

Three dense sentences convey the endpoint, naming rule, key side effect, and gating condition with zero filler. The most decision-relevant information is front-loaded.

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 9-parameter metadata-create tool with no annotations and no output schema, the description covers the critical behavioral context: endpoint, naming derivation, auto-created Name field, and the required feature flag. Combined with high schema coverage, this is enough to invoke the tool correctly, though return-value details could still be an optional addition.

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 coverage is already 89%, and the description adds important relationships not visible in the schema: 'label' (or 'name') drives the API-name derivation, and 'nameFieldType: AutoNumber' suppresses the automatic Name field. This helps the agent understand how the parameters interact.

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 names the operation ('Create a custom object'), the exact API resource ('CustomObject' via Tooling API), and the POST endpoint, making the tool's purpose unambiguous. It clearly distinguishes this from record-level tools like sf_create_record and field-level tools like sf_create_custom_field.

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 gives a clear prerequisite (MC_NEXT_ALLOW_METADATA_CHANGES=true) and implies a metadata-creation context, but it never explicitly tells the agent when to choose this over alternatives such as sf_create_record or sf_create_custom_field. An agent must infer routing from the tool name and the phrase 'custom object.'

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