Skip to main content
Glama

Create agent

create_agent

Create a new agent and save it. Returns the created agent with its new ID. Use type='conversational' for general-purpose agents, 'code' for agents that work with repos/files, 'browser' for an agent that works in websites in its own browser (its browser settings), 'delegate' for a Team agent: a lead whose members (delegate_agent_ids; empty = any agent) do the work, as a team in parallel (the default) or one at a time (team); its own tools are what its lead answers small questions with, usually none. Set tools=['all'] to give access to all tools, or list specific tool names.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "description": "<description>",
      "type": "<type>",
      "tools": "<tools>",
      "system_prompt": "<system_prompt>"
    },
    "name": "create_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name for the agent
teamNoFor a Team agent (type 'delegate') only: how its members work. Omit it and a new Team agent works as a team. {"mode": "team"}: members work in parallel on what its lead assigns, talking while they work; "one_at_a_time": the lead hands work to one member and waits. Optional: at_once (members working at once, default 3), task_budget (tasks in all, default 6), spend_limit_usd (per turn).
typeYesAgent type
modelNoOptional LLM model override (e.g. claude-opus-4-6, gemini-2.5-pro). Leave null for system default.
reposNoList of repo IDs (for code agents). Use list_repos to find IDs.
toolsYesList of tool names, or ['all'] for all tools
boardsNoWhether the agent posts to the board of the workflow it runs in: {"own": false} for an agent whose workflow was given a shared board to post to. Omit to keep the default (on).
memoryNotrue: the agent keeps what it learns across conversations and runs (remember, search_memory) and reads its memory's index every turn. For an agent that must recall people, preferences or past results; omit for one that starts fresh each time (the default).
browserNoFor a Browser agent (type 'browser') only: where it may go and what it starts with. sites: hosts its pages may reach ('portal.example.com', or '*.example.com' for its subdomains; empty = any public site); sessions: kept sessions it starts signed in with, by id from list_browser_sessions or by site (the person's own; one per site); recordings: recording ids it may run by code; mode: 'read_only' (default) or 'co_drive' (it may type and send, with the person watching); action_budget: actions per task (1-200, default 40). Signing in and recording are a person's, in the app.
knowledgeNoKnowledge base ids it answers from (from list_knowledge_bases; at most 10, active ones, while Knowledge is on): it can then search and read those bases. Omit for none.
db_configsNoList of DB config IDs (for agents needing database access).
descriptionYesWhat this agent does
tool_policyNoWhen the agent must ask a person before a tool runs: {"tool:<name>": "confirm"} for each tool that books, pays, sends, posts or deletes. The plan's 'Asks you first' list says which. Omit for none.
system_promptYesDetailed system instructions for the agent. Be thorough.
delegate_agent_idsNoFor a Team agent: its members' agent IDs. Leave empty to allow any agent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description goes well beyond that: it states the agent is persisted with a new ID, that delegate agents run members in parallel by default or one at a time, that memory persists across conversations and runs, and that a browser agent starts read-only unless co_driven. It omits permission requirements and the consequence of creating duplicates, which are the remaining gaps for a non-idempotent write.

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 and return value are front-loaded, and every sentence after that maps to a decision the caller must make (type, tools). The delegate clause is dense and slightly tangled — 'its own tools are what its lead answers small questions with, usually none' — costing a little readability.

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 15-parameter, nested-object creation tool with no output schema, the definition names where the result goes (the created agent plus new ID) and explains the two highest-risk choices (type and tools). The remaining configuration surface is fully covered by the schema, so an agent has enough to call this correctly, though guidance on duplicate creation or permissions is absent.

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 the baseline would be 3; the description earns above that by adding real meaning the schema lacks — most notably what each 'type' enum value is for (the schema only says 'Agent type') and the ['all'] shorthand for tools. It leaves the other eleven nested parameters (team, browser, memory, boards, tool_policy, knowledge) to the schema, which already documents them thoroughly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Create a new agent and save it') plus the return contract ('Returns the created agent with its new ID'), so the effect is unambiguous. It does not contrast itself with the sibling update_agent or create_agents, so an agent can't tell from the description alone whether it should create one vs. many or modify an existing one.

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?

Gives concrete selection guidance for the type enum ('conversational' for general-purpose, 'code' for repos/files, 'browser' for website work, 'delegate' for a Team lead) and for tools (['all'] vs. specific names). It stops short of stating when not to call it at all, e.g. that update_agent should be used for an existing agent rather than re-creating one.

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.