Skip to main content
Glama

Extract an agent template

cs_extract_agent_template

Export an existing Copilot Studio agent's topics, settings, and components as a reusable YAML template for use in other environments or solutions.

Instructions

Write a reusable YAML template from an existing agent (its topics, settings and components), for cs_create_agent_from_template in another environment or solution. Runs 'pac copilot extract-template' with the active pac auth profile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
botYesAgent id or schema name
cwdNoWorking directory for pac (for project commands: the solution project folder)
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.
overwriteNoOverwrite the file if it exists
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
environmentNoEnvironment id or URL; default: the environment of the active pac auth profile
templateFileYesPath of the YAML template to write
templateNameNoTemplate name (default kickStartTemplate)
timeoutSecondsNoDefault 600
templateVersionNoTemplate version X.Y.Z (default 1.0.0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.5

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It discloses the actual mechanism ('pac copilot extract-template') and that it runs under the active pac auth profile, which is useful context, but says nothing about write side effects on disk, failure modes when the agent or profile is missing, or what the returned jobId/file looks like.

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?

Two tight sentences: the first front-loads the action and its output, the second supplies the execution mechanism. No filler and nothing repeated from the schema.

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 extraction tool with no annotations and no output schema, the description covers purpose, the round-trip sibling and the auth context adequately, and the fully-covered schema handles parameter details. The only gap is behavioral disclosure around overwrite/permissions, which the absent annotations leave unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including bot, templateFile, overwrite, background and profile is already documented in the schema; the baseline is 3. The description adds no per-parameter detail beyond noting the template's contents, so it does not exceed what the schema already provides.

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?

Specific verb plus resource: writes a reusable YAML template capturing an existing agent's topics, settings and components. It names the exact round-trip counterpart (cs_create_agent_from_template) and the underlying command, so an agent can distinguish this from siblings like cs_clone_agent or cs_pull without opening any schema.

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 clear context: use this to produce a template intended for another environment or solution, via cs_create_agent_from_template. It stops short of stating exclusions (e.g. when to clone instead of templating), but the intended workflow is unambiguous.

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