Skip to main content
Glama

create_agent

Creates a new Cloud Agent from a prompt and queues its execution, optionally connecting to a repository and configuring model, mode, and MCP servers.

Instructions

Create a Cloud Agent and enqueue its initial run (POST /v1/agents).

Args: prompt_text: Required instruction text for the agent. name: Optional display name (max 100 chars). repo_url: Optional GitHub repository URL. starting_ref: Optional branch or SHA starting point. pr_url: Optional PR URL (repo_url still required when set). model_id: Optional model id from list_models. auto_create_pr: Whether to open a PR when the run completes. work_on_current_branch: Push to starting ref instead of a new branch. mode: Initial mode: agent or plan. agent_id: Optional client-supplied id (bc-...) for idempotent create. prompt_images_json: Optional JSON array of prompt images ({data,mimeType} or {url}). mcp_servers_json: Optional JSON array (string or list) of inline MCP servers. extra_json: Optional JSON object (string or object) merged into the request body for advanced fields. Cannot overwrite keys already set by typed args (for model.params, omit model_id and pass full model).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
nameNo
pr_urlNo
agent_idNo
model_idNo
repo_urlNo
extra_jsonNo
prompt_textYes
starting_refNo
auto_create_prNo
mcp_servers_jsonNo
prompt_images_jsonNo
work_on_current_branchNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the full burden. It mentions idempotent creation via agent_id but does not detail error scenarios, rate limits, or side effects beyond the initial run enqueue. The note on extra_json conflicts is a minor behavioral disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description starts with a clear purpose but then becomes a lengthy parameter list. While structured, it could be more concise by grouping related params or using shorter descriptions. The front-loaded sentence is good.

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

Completeness3/5

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

Covers all 13 parameters but does not explain the output (though an output schema exists). Missing guidance on when to create a new agent vs. using create_agent_run, and no mention of typical use cases or workflow context.

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 0%, so the description provides all parameter semantics: constraints (e.g., max 100 chars), formats (bc-...), and advanced usage (extra_json). Each parameter gets an explanation beyond the schema's type and title.

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 'Create a Cloud Agent and enqueue its initial run' and includes the HTTP method and endpoint. It distinguishes from sibling tools like archive_agent, delete_agent, and create_agent_run by focusing on creation and initial run.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives such as create_agent_run (for existing agents) or list_agents (for querying). The description does not provide context on prerequisites or exclusions.

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/PhillipChaffee/cursor-api-mcp'

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