Skip to main content
Glama

upsert_stage

Create or update conversation stages in BotUyo agents to define AI behavior at specific steps, managing stage configurations and connections between stages.

Instructions

Create or update a named stage in an agent's conversation flow.

A stage defines what the agent does at a particular step in the conversation. Stages are nodes in a graph connected by edges (connections).

Examples of stage names: "welcomeStage", "salesStage", "hostStage", "checkoutStage"

The stage config is merged with existing stages — existing stages you don't specify are kept unchanged. Connections and channelFlows replace existing values when provided.

Requires role: owner, admin, or developer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentIdYesThe MongoDB ID of the agent
stageNameYesName key for this stage (e.g. "welcomeStage", "salesStage")
stageConfigYesFull stage configuration object.
connectionsNoGraph edges between stages. Replaces ALL existing connections.
channelFlowsNoPer-channel flow overrides. Key = channel name, value = { connections: [...] }. Replaces ALL existing channelFlows.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining the merge behavior ('stage config is merged with existing stages'), replacement behavior for connections/channelFlows, and permission requirements. It could improve by mentioning potential side effects or error conditions, but covers key behavioral aspects.

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 efficiently structured with clear paragraph breaks: purpose statement, conceptual explanation, examples, behavioral details, and permission requirements. Every sentence adds value with no redundancy or unnecessary elaboration.

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 complex mutation tool with 5 parameters, nested objects, and no annotations/output schema, the description does well by explaining the tool's purpose, behavior, and permissions. It could be more complete by describing what happens on success/failure or providing more guidance about the stageConfig structure, but covers most essential context.

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 schema already documents all parameters thoroughly. The description adds minimal parameter-specific information beyond what's in the schema (only mentioning that connections and channelFlows replace existing values). Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('create or update') and resource ('named stage in an agent's conversation flow'), with specific examples of stage names provided. It distinguishes this tool from siblings like 'create_agent' or 'update_agent' by focusing on stages within agents rather than agents themselves.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool (to define what an agent does at a particular step in a conversation flow) and specifies required roles (owner, admin, or developer). However, it doesn't explicitly mention when NOT to use it or name alternative tools for related operations.

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/MarcoAR1/botuyo-mcp'

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