Skip to main content
Glama

Create an agent from a template

cs_create_agent_from_template

Create a new Copilot Studio agent in a solution from a template YAML. Requires confirmation to apply changes to a live environment.

Instructions

Create a new agent in a solution from a template produced by cs_extract_agent_template. Runs 'pac copilot create' with the active pac auth profile. Mutates a live environment: requires confirm: true (a dry run otherwise).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
confirmNoRequired to actually perform a change in a live environment. Without it the tool returns a dry run.
profileNopac auth profile to run as: the admin account for tenant commands. Defaults to CPS_ADMIN_PROFILE for admin commands and CPS_PAC_PROFILE otherwise, then the active profile. cs_init lists the profiles.
solutionYesUnique name of the solution to create the agent in
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
schemaNameYesSchema (unique) name of the new agent, e.g. contoso_HelpDesk
displayNameYesDisplay name of the new agent
environmentNoEnvironment id or URL; default: the environment of the active pac auth profile
templateFileYesTemplate YAML from cs_extract_agent_template
timeoutSecondsNoDefault 900

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A4.4/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 burden, and it does well: it discloses that the tool mutates a live environment, that confirm:true is required for a real change, and that without it the run is a dry run. It also reveals the underlying command and active profile dependency. It could add more about side effects or failure modes, but the critical mutation semantics are transparent.

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?

Three sentences with no filler. The first sentence states the core action and source, the second names the mechanism, and the third flags the critical mutation behavior. Every sentence earns its place and is front-loaded.

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 10-parameter mutation tool with no output schema, the description covers the essential behavioral context: creation source, underlying command, live-environment mutation, and dry-run gating. It does not describe return values or result format, which would be useful since no output schema exists, but the parameter schema and background/jobId handling fill most remaining gaps.

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 description coverage is 100%, so the baseline is 3. The description adds extra meaning beyond the schema by clarifying that templateFile comes from cs_extract_agent_template and that confirm:true controls dry-run vs. live mutation, which the schema only partially conveys. This lifts it above baseline.

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?

States a specific verb ('Create a new agent') and resource ('in a solution from a template'), and explicitly ties the template to cs_extract_agent_template. This clearly differentiates it from the plain cs_create_agent sibling and other agent operations. Even without naming the alternative, the purpose is unambiguous.

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 context: the tool creates from a template produced by another tool, runs through pac, and requires confirm:true for an actual mutation. It does not explicitly state when to prefer this over cs_create_agent or list exclusions, but the prerequisite and dry-run behavior provide strong usage guidance.

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