Skip to main content
Glama

Add a tool (connector, MCP server, flow, prompt, agent, or raw)

cs_add_tool

Adds an action to a Copilot Studio agent by writing its .mcs.yml definition. Supports connector, MCP, flow, prompt, connected-agent, child-agent, or raw types; previews file changes first and writes only after confirmation.

Instructions

Create actions/.mcs.yml. type 'connector': a connector operation (connectorId like shared_office365, operationId like SendEmailV2; use cs_list_connectors / cs_describe_connector to find them). type 'mcp': an MCP server exposed through a connector. type 'flow': a cloud flow by id. type 'prompt': an AI Builder prompt by model id (cs_list_prompts). type 'connected-agent': another Copilot Studio agent by schema name. type 'child-agent': a child agent's GPT component. type 'raw': any other TaskAction kind with the action object supplied. When the connector definition is cached, the operationId is checked and required inputs are filled from the catalog unless inputs are given. Connector and MCP tools need a connection that only the portal can authorise; the tool writes the connection-reference stub and returns the portal step. The first call changes nothing: it returns the files it would write, as a diff against what is there now, for the user to approve. Call it again with the same arguments plus confirm: true to write them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
typeYes
actionNotype raw: full TaskAction object with kind
flowIdNo
inputsNo
confirmNoRequired to write the change to the file. Without it the tool returns a preview - the changed lines against the current ones, and the character count - and writes nothing.
outputsNo
aiModelIdNotype prompt: AI Builder model id
overwriteNo
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
connectorIdNoshared_<name> or a display name from the catalog
descriptionYesAlso used as modelDescription unless overridden; the orchestrator routes on it
operationIdNo
botSchemaNameNotype connected-agent
connectionModeNoInvoker = end user's connection; Maker = the maker's shared connection
modelDescriptionNo
inputsFromCatalogNoDefault true: when no inputs are given and the connector definition is cached, add automatic inputs for the operation's required parameters
connectionReferenceNoExisting logical name from connectionreferences.mcs.yml
gptComponentSchemaNameNotype child-agent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.7
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "Required to write the change to the file. Without it the tool returns a preview - the changed lines against the current ones, and the character count - and writes nothing.",
      +  "type": "boolean"
      +}
  2. First observedv0.1.5

TDQS

A4.3/5.0
Behavior5/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, and it does so well. It discloses the two-phase preview/confirm workflow, that the first call changes nothing, that confirm: true is required to write, and that connector/MCP tools need a portal-authorized connection with the tool only writing a stub and returning the portal step. This is exactly the kind of side-effect and auth context an agent needs.

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?

The description is dense but efficiently organized, using a type-by-type pattern that makes seven variants digestible in one paragraph. Every clause earns its place, and the critical preview/confirm safety behavior is reserved for the end rather than competing with the type definitions.

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 complex 19-parameter tool with no output schema and no annotations, the description covers the essentials: type selection, type-specific fields, catalog behavior, auth constraints, and the confirm workflow. It leaves some parameter semantics unexplained such as outputs and overwrite, but an agent can plausibly invoke the tool correctly using the provided mapping and schema.

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 only 58%, and the description compensates by mapping each type to its relevant parameters: connectorId/operationId for connector, aiModelId for prompt, botSchemaName for connected-agent, gptComponentSchemaName for child-agent, and action for raw. Some parameters like outputs and overwrite remain unexplained in both schema and description, so it is helpful but not complete.

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?

The description opens with the concrete action 'Create actions/<name>.mcs.yml' and then enumerates every supported type with its identifying fields, so an agent knows exactly what resource it is creating. It is clear, but it does not explicitly differentiate this generic tool from closely related siblings like cs_add_flow or cs_edit_tool, so it stops short of full sibling-level distinction.

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 operational context: it maps each 'type' value to the right parameter and even points to helper tools such as cs_list_connectors and cs_list_prompts. It does not, however, state when NOT to use this tool or name alternatives like cs_add_flow, so the exclusion guidance is missing.

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