Skip to main content
Glama

Create or update an AI agent

agent_upsert
DestructiveIdempotent

Create an AI agent, or update one by passing agentId. A CHAT agent will reply to real prospects once it is active and attached to a campaign — set isActive: false while iterating on its instructions. The behaviour comes from personality (who it is), intent (what it is trying to achieve) and instructions (how it should write). This creates or edits the agent and nothing else. It does not attach it to a campaign (campaign_update), give it source material (kb_upsert then kb_attach), or build its embeddings (agent_train, which must run after any knowledge change). Test with agent_query before it touches a real conversation. There is no tool to delete an agent. Requires the "Agents" permission on the plan.

Input Schema

NameRequiredDescriptionDefault
faqsNoCanned answers the agent should use verbatim.
nameYesInternal name.
typeNoCHAT for inbox replies, CONTENT for post drafting.
actionNoEnable calendar booking.
intentNoThe outcome it is steering the conversation toward.
notifyNoNotify you when the agent replies.
promptNoRaw system prompt override. Usually leave unset.
topicsNoSubjects the agent is allowed to discuss.
agentIdNoOmit to create a new agent.
userIdsNoShare this agent with these sub-accounts.
channelsNoWhere the agent operates, e.g. ["linkedin","email"].
isActiveNoWhether the agent runs. Keep false while drafting.
languageNoLanguage code, e.g. "en", "fr", "de", "it", "pt", "ja".
providerNoPrimary model provider. Must be connected.
waitTimeNoMinutes to wait before replying, so it reads as human.
followupsNoFollow-up messages sent when a lead goes quiet.
maxMessagesNoCap on agent messages per conversation.
personalityNoWho the agent is and how it carries itself.
businessNameNoCompany the agent represents; injected into its prompt.
instructionsNoConcrete writing rules: tone, length, what to avoid.
stopScenariosNoSituations in which the agent stops replying.
actionSettingsNoBooking settings. Used when `action` is "APPOINTMENT".
prohabitedWordsNoWords the agent must never use. Field name is spelled this way in the schema.
fallbackProviderNoUsed when the primary provider errors.
pauseBotOnManualMessageNoStand down as soon as a human replies in the thread.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With destructiveHint/idempotentHint/openWorldHint already declared, the description adds real value: it scopes the side effect ('creates or edits the agent and nothing else'), names the required 'Agents' plan permission, warns that an active CHAT agent talks to real prospects, and notes no delete tool exists. It does not explain what an update does to omitted fields among the 25 parameters, which matters given destructiveHint=true.

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?

Purpose and create-vs-update discriminator are front-loaded, then behaviour, then exclusions, then prerequisites. Every sentence carries a decision an agent would otherwise get wrong (active-state risk, knowledge-change ordering, permission requirement) — no filler for a 25-parameter tool.

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?

Covers creation versus update, permission gate, side-effect boundary, and prerequisite/ordering tools, which is substantial for a 25-param nested destructive upsert. The remaining gap is that with no output schema, it never says what is returned (e.g. the new agent id) after a create, which an agent would need for follow-up calls.

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 3 is the baseline; the description goes slightly beyond by framing the three behavioural fields as distinct axes (personality = identity, intent = goal, instructions = writing rules) and by advising `isActive: false` during drafting. It does not add merge/replace semantics for the many optional fields, so it is not a full 5.

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?

States a specific verb and resource (create/update an AI agent) and defines the discriminator inline: pass `agentId` to update. It also draws the boundary against siblings by name (campaign_update, kb_upsert/kb_attach, agent_train, agent_query), so an agent can place it in the workflow without opening schemas.

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?

Explicit when-to guidance (set `isActive: false` while iterating; test with `agent_query` before real conversations) plus explicit what-this-does-not-do with the correct alternative for each gap: attaching to a campaign, sourcing knowledge, and building embeddings via `agent_train` after any knowledge change. Nothing about tool selection is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources