Skip to main content
Glama

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

cs_add_tool

Create a Copilot Studio agent action by generating a .mcs.yml file with type, inputs, and outputs; supports connectors, flows, prompts, and child agents, and handles connection references for portal authorization.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
typeYes
actionNotype raw: full TaskAction object with kind
flowIdNo
inputsNo
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. First observedv0.1.5

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does substantial work: it discloses that the tool writes a connection-reference stub, returns a portal step for connector/MCP types, checks operationId against a cached catalog, and auto-fills required inputs unless inputs are given. It does not state whether overwrite is destructive or what happens on validation failure, but the disclosed behaviors go well beyond a bare 'Add a tool'.

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?

The description is dense but organized as a type-by-type list, which is appropriate for an 18-parameter tool. It front-loads the core artifact and then groups related information. It is long, but nearly every clause carries routing or behavioral information; only minor redundancy exists between the title and the first sentence.

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 18-parameter tool with no output schema and no annotations, the description covers the main decision axes: which type to choose, which identifiers to supply, and the connection caveat. It does not explain the return value or the portal step in detail, and it leaves outputs/overwrite semantics to the schema, but the essential calling context is present.

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 56%, and the description compensates for the gap by explaining the meaning of type-specific identifiers (connectorId, operationId, aiModelId, botSchemaName, gptComponentSchemaName) and the inputsFromCatalog default. It does not elaborate on outputs, overwrite, or modelDescription, but the type-routing explanation adds real value beyond the schema.

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?

The description opens with a concrete artifact ('Create actions/<name>.mcs.yml') and then enumerates every supported type with its required identifiers, which fully disambiguates this from sibling tools like cs_add_flow, cs_add_topic, and cs_edit_tool. The verb 'Create' plus the explicit file target makes the tool's function unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives per-type selection guidance ('type 'connector': ... use cs_list_connectors / cs_describe_connector to find them', 'type 'prompt': ... cs_list_prompts'), tells when inputs are auto-filled from the catalog, and warns that connector/MCP tools need a portal-authorized connection. This is explicit when-to-use and how-to-route 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