Skip to main content
Glama

Create a new agent

cs_create_agent

Create a local Copilot Studio agent workspace or initialize a live agent in an environment, with optional solution binding and background execution.

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. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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"
      +]
  3. First observedv0.1.5

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the no-sign-in local path vs. the authenticated live path, the confirm:true requirement, and the multi-step solution pipeline (init, pack, import, clone). It could say more about failure modes or side effects on an existing workspace, but the safety-relevant behavior is well surfaced.

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?

Front-loaded with the core action, then dense conditional clauses that each carry real information. It is somewhat packed and long, but every sentence earns its place; no filler.

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 12-parameter mutation with no output schema and no annotations, the description covers the mode-switching parameters that actually determine behavior. Per-parameter details like background/jobId polling and publisherPrefix are left to the schema, which is acceptable given 75% coverage.

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 75%, and the description adds genuine cross-parameter meaning rather than repeating field docs: how 'environment' toggles the whole mode, that 'solutionName' requires environment and triggers createSolution semantics, and the behavioral difference between the two authoringMode values. This exceeds the baseline-3 case for well-covered schemas.

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?

States a concrete verb ('create a new agent workspace on disk') with a clear resource and scope, and pins down the underlying mechanism ('pac copilot init'). It doesn't explicitly differentiate itself from near-siblings like cs_clone_agent or cs_create_agent_from_template, which keeps it from a 5.

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 clear conditional usage: omitting 'environment' produces a local scaffold with no sign-in, passing it creates a live agent requiring a pac auth profile and confirm:true, and 'solutionName' changes where the agent lands. It never names an alternative tool to use instead, so it falls short of explicit when-not/alternatives routing.

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