Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Create Agentforce Agent

sf_create_agent
Idempotent

Creates an Agentforce agent shell in Salesforce, initiating the first step toward building a functional agent with actions, topics, and a connected planner.

Instructions

Creates an Agentforce Agent (Einstein Copilot) shell in Salesforce. THIS IS STEP 1 OF A 5-STEP SEQUENCE — calling this tool alone produces a non-functional agent shell. You MUST continue calling tools in this exact order without stopping: (0) FIRST create the backing flows (sf_create_flow, flowType=AutoLaunchedFlow, status=Active) and/or Apex classes (sf_create_apex_class with @InvocableMethod) for each capability. (1) THIS TOOL — sf_create_agent. (2) sf_create_agent_action — one call per flow/apex. (3) sf_create_agent_topic — group actions into topics; pass all action API names in the 'actions' array. (4) sf_create_agent_planner — wire topics to the agent. DO NOT report completion to the user until sf_create_agent_planner succeeds. Do not ask the user for confirmation between steps — proceed through all steps autonomously. On the first call (no plannerName), this tool probes whether the org can create custom agent actions at all before creating the shell — if it can't, this call fails with no shell created, rather than leaving an orphaned Bot with no planner/topic/action once step 2 turns out to be unreachable. Active Agentforce permission set licenses do NOT guarantee this probe passes — those are a separate signal, confirmed live to be an unreliable one. Pass skipActionCapabilityCheck:true only for a topics-only agent (no custom actions planned) or when you already know the answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toneNoCommunication tone for agent responsesNeutral
labelYesAgent display label shown to users, e.g. 'Sales Assistant'
companyNoCompany name for the agent's context
personaNoAgent persona/role description, e.g. 'A knowledgeable sales expert who helps close deals'. Deployed as the BotVersion <role>.
agentNameYesAgent API name — letters and numbers only, NO underscores (Salesforce rejects underscores in Bot developer names). Max 40 chars. e.g. 'SalesAgent', 'SupportBot'. Used in all subsequent calls (sf_create_agent_topic, sf_create_agent_planner).
descriptionNoAgent description
plannerNameNoAPI name of the GenAiPlannerBundle to attach this agent to. Normally omitted on the first call (the planner does not exist yet) — after sf_create_agent_planner succeeds, call this tool again with the same agentName plus plannerName to complete the agent→planner link. This tool is idempotent, so re-running it updates the existing agent.
skipActionCapabilityCheckNoSkip the pre-flight probe for GenAiFunction (custom agent action) support. The probe exists to fail fast before creating an orphaned agent shell in orgs that can't create custom actions — set this true only if you already know the agent needs topics/instructions with no custom Flow/Apex-backed actions, or already know the probe's answer from a prior call.
Behavior5/5

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

Discloses behavioral traits beyond annotations: the tool on first call probes org capability and fails without creating an orphaned shell, re-running updates the existing agent, and creating the shell alone produces a non-functional agent. This complements idempotentHint and readOnlyHint without contradicting them.

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?

Purpose is front-loaded in the first sentence and the long paragraph is dense with necessary workflow, probe, and idempotency details. It is appropriately sized for a complex 5-step tool, though the wall-of-text structure could be formatted more scannably.

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

Completeness5/5

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

For a complex tool with no output schema, the description covers the full lifecycle: prerequisites, exact sequence, failure behavior ('fails with no shell created'), when to skip the probe, and the plannerName re-link pattern. It is complete enough for an agent to invoke and sequence this tool correctly.

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 100% so baseline is 3. The description adds beyond-schema meaning for agentName ('Used in all subsequent calls'), plannerName ('normally omitted on the first call... call this tool again'), and skipActionCapabilityCheck (topics-only condition). This moves it above baseline, though not every parameter receives additional enrichment.

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?

First sentence clearly states it 'Creates an Agentforce Agent (Einstein Copilot) shell in Salesforce' — a specific verb+resource. It distinguishes itself from sibling tools by labeling itself 'STEP 1 OF A 5-STEP SEQUENCE' and naming sf_create_agent_action, sf_create_agent_topic, and sf_create_agent_planner as the subsequent tools.

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

Usage Guidelines5/5

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

Provides an explicit numbered sequence with exact order, including prerequisite step 0 (sf_create_flow/sf_create_apex_class) and the rule to continue through all steps autonomously. It also specifies when to use skipActionCapabilityCheck, giving clear when/why guidance.

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