Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Use Copilot Studio MCP as the automated authoring interface, with an approval-controlled client generating agent or workflow definitions locally and the service validating and saving them; use PAC CLI, connector definitions, solutions, and pipelines for source control and deployment rather than expecting the running autonomous agent to rewrite itself. ^1^
Recommended build architecture
- External builder: Use a supported MCP client to call Copilot Studio MCP.
- Request
get_copilot_studio_skillswithagent-authoring,workflow-authoring,workflow-troubleshooting, ortesting-and-credits. - Have the client produce definitions locally from requirements.
- Keep approval controls enabled before create, update, publish, deploy, run, or delete operations.
- Treat draft creation, publication, and execution as separate operations.
- Complete connector authentication interactively unless the server explicitly advertises connector-setup operations. Never send secrets through prompts. ^1^
- Request
- Agent source workflow: Where the agent type is supported by the current PAC CLI workspace format, clone the existing agent, let the builder modify the local definitions, review the diff, and push it back. PAC supports
clone,pull,push,pack, andpublish; it does not make an autonomous runtime agent into an unrestricted author. ^2^
pac auth create
pac copilot clone `
--bot <agent-id-or-schema-name> `
--environment <environment-id> `
--output-dir ./wealthbox-agent
# Run from the connected workspace:
pac copilot pull
# Generate/edit definitions, then review and test them.
pac copilot push
pac copilot publish --bot <agent-id-or-schema-name>
Before adopting this for the existing GitHub Copilot-harness agent, test pac copilot clone in a development environment and inspect what it retrieves. The PAC documentation describes Copilot Studio workspaces but does not establish that every newer GitHub-harness artifact—including skills and preview tools—round-trips completely.
For a new CLI-authored agent, pac copilot init --authoring-mode cli-copilot scaffolds the workspace. pac copilot pack only creates a solution ZIP; deployment then requires pac solution import, a Power Platform pipeline, or another supported solution import operation. ^2^
What each mechanism does
| Mechanism | Supported role and boundary |
|---|---|
| Generative build | Creates starting metadata—name, description, instructions—and suggests channels, triggers, connectors, and limited knowledge sources. It does not generate arbitrary tools outside prebuilt connector actions/triggers; those capabilities still require configuration. ^3^ Topic generation is also limited to Message, Question, and Condition nodes. ^4^ |
| Autonomous agents | Recurrence or event triggers start runtime planning without a user. The planner selects configured tools, topics, agents, and knowledge; it is not a design-time component factory. Copilot Studio explicitly limits agents to components the maker configured. ^5^ |
| GitHub-harness workflows | Deterministic, multistep tools built in the workflow designer. Creating and attaching a workflow from the GitHub-harness Build tab is currently documented as preview. It requires When an agent calls the flow, Respond to the agent, Save, and Publish. ^6^ |
| MCP attached to the agent | A runtime integration surface: an MCP server exposes custom services, APIs, or databases as tools. For the GitHub harness, adding MCP or Workflow custom tools is supported by its tool experience; associated add-tool documentation identifies preview surfaces where applicable. ^7^ This is distinct from Copilot Studio MCP, which is the authoring/management interface used by the external builder. |
| Skills | GitHub-harness skills are portable packages of instructions, scripts, and resources—not API connectors. They package expertise and reusable logic. ^8^ The available documentation here does not establish a supported API or PAC command for creating and attaching skills programmatically; do not assume an automated skill-deployment contract beyond the documented authoring surface. |
| Solutions/ALM | Package and promote agents, flows, connectors, and related components between Dataverse-backed environments. Solutions are the supported ALM boundary; source control should be the source of truth. ^9^ |
| PAC connector | Programmatically creates or updates custom connector records from OpenAPI and API-properties files, optionally adding them to a solution. This is the appropriate construction path for evolving the Wealthbox connector definition. ^10^ |
| Power Platform REST API / Dataverse API | Supported primarily for administration and Dataverse record operations. The developer guidance identifies the Power Platform REST API as an agent-administration interface—not as a general replacement for authoring every agent component. ^11^ |
Automating the Wealthbox connector
Generate reviewed apiDefinition.json and apiProperties.json files from requirements, store them in Git, and deploy them first to a Dataverse-backed development environment:
pac connector create `
--api-definition-file ./apiDefinition.json `
--api-properties-file ./apiProperties.json `
--environment <environment-id> `
--solution-unique-name <solution-name>
pac connector update `
--connector-id <connector-id> `
--api-definition-file ./apiDefinition.json `
--api-properties-file ./apiProperties.json `
--environment <environment-id>
After testing authentication and operations, attach the connector, MCP server, or workflow as a tool and promote the solution through the deployment pipeline. The running agent may dynamically choose among those published tools, but changes to definitions should remain a reviewed build-and-deploy operation.
References
- Connect to Microsoft Copilot Studio with MCP
- pac copilot
- FAQ for the agent creation from natural language experience
- Create and edit topics with Copilot
- FAQ for using generative orchestration
- Add a workflow to your agent as a tool (GitHub Copilot) (preview)
- Add a tool to an agent (GitHub Copilot)
- Skills overview for agents (GitHub Copilot)
- Overview of application lifecycle management with Microsoft Power Platform
- pac connector
- Introduction to Microsoft Power Platform for developers