Skip to main content
Glama

Create a new agent

cs_create_agent

Creates a new agent workspace on disk, with optional live environment bootstrap and solution assignment. Choose classic or CLI authoring modes to scaffold, import, and sync.

Instructions

pac copilot init: create a new agent workspace on disk. Without 'environment' it is a local scaffold (no sign-in). With 'environment' it also creates the live agent and connects the workspace (needs pac auth profile and confirm: true). With 'solutionName' the agent is created inside that solution (existing unmanaged solution, or a new one with createSolution: true) via init, pack, import and clone; without it, pac puts the agent in a solution named after the agent. authoringMode 'classic' is the standard harness (topics, evaluations); 'cli-copilot' is the GitHub Copilot harness.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAgent display name
confirmNoRequired to actually perform a change in a live environment. Without it the tool returns a dry run.
templateNoclassic only
backgroundNoRun in the background and return a jobId immediately, then poll cs_job_status. MCP clients cut a tool call off after about 60 seconds; this operation can take much longer, and without this the work is orphaned rather than cancelled.
projectDirNoFolder for the agent's files, new or empty. Omit it to be offered one named after the agent.
schemaNameNo
environmentNoEnvironment id or URL to bootstrap into (creates a live agent)
instructionsNo
solutionNameNoUnique name of the solution to create the agent in (requires environment)
authoringModeNo
createSolutionNoCreate solutionName if it does not exist
publisherPrefixNoPublisher prefix, 2-8 lowercase letters or digits: it becomes part of every component's schema name and must match the publisher of the solution the agent lands in. Omit it to be shown the publishers in the environment and what the choice decides.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.7
    • addedInput schema / properties / background
      Added value: +{
      +  "description": "Run in the background and return a jobId immediately, then poll cs_job_status. MCP clients cut a tool call off after about 60 seconds; this operation can take much longer, and without this the work is orphaned rather than cancelled.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / projectDir / description
      Previous value: -"Target directory (must be empty or not exist)"New value: +"Folder for the agent's files, new or empty. Omit it to be offered one named after the agent."
    • changedInput schema / properties / publisherPrefix / description
      Previous value: -"Solution publisher prefix, e.g. contoso; must match the publisher of an existing target solution"New value: +"Publisher prefix, 2-8 lowercase letters or digits: it becomes part of every component's schema name and must match the publisher of the solution the agent lands in. Omit it to be shown the publishers in the environment and what the choice decides."
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "publisherPrefix",
      -  "projectDir"
      -]New value: +[
      +  "name"
      +]
  2. First observedv0.1.5

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses local vs. live behavior, the need for an auth profile and confirm, the 'init, pack, import and clone' sequence, and differences between authoring modes. It stays quiet on a few side effects (e.g., likely dry-run when confirm is omitted), but the detail that is present meaningfully informs the agent.

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?

The description is one dense paragraph but opens with the core purpose and then uses conditionals to explain the branches. Every sentence contributes distinct behavior or mode guidance, and there is no outright fluff. A bit more formal structure, such as bullets, would improve readability but the length is justifiable.

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 tool with 12 parameters, a deeply branching workflow, and no output schema or annotations, this description covers the decision-driving aspects: environment, confirm, solutionName, createSolution, and authoringMode. Remaining gaps like exact return value and some parameters are partially covered by the schema, so overall this is a solid contextual base for capable invocation.

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?

The input schema covers 75% of parameters, so the bar is near the baseline, but the description adds important semantics for environment, solutionName, createSolution, and authoringMode. For example, it says that authoringMode 'classic' is the standard harness and 'cli-copilot' is the GitHub Copilot harness, which is not in the schema. It does not explain every parameter, but it enriches the most consequential ones.

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 states a specific verb and resource: 'create a new agent workspace on disk.' It further distinguishes local versus connected live agent creation and says how authoring modes differ. This clearly separates it from sibling tools like cs_update_agent, cs_clone_agent, or cs_init.

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 gives concrete context for when to use different branches: omit environment for a local scaffold, provide environment with confirm for a live agent, pass solutionName to target a solution, and createSolution to make a new one. It does not explicitly name alternative sibling tools or when not to use them, so it falls short of a 5 but is far above vague.

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

Deploy Server

Other Tools