Skip to main content
Glama

Add a knowledge source

cs_add_knowledge_source

Add a knowledge source to a Copilot Studio agent by defining its type and details in YAML; preview the file changes first, then confirm to write them.

Instructions

Add knowledge as YAML: kind 'public-site' (Bing-scoped website, max 2 path levels), 'sharepoint' (direct folder URL), 'graph-connector' (Microsoft Graph connector via environment variable), or 'files' (copy documents into knowledge/files for upload on push). Dataverse, AI Search and SQL knowledge are portal-only. 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
kindYes
nameYes
siteNo
filesNoAbsolute paths of documents (pdf, docx, txt, ...)
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.
overwriteNo
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
descriptionNo
connectionNameNo
includeSubPagesNo
triggerConditionNoPower Fx condition restricting when this source is searched
contentSourceDisplayNameNo
connectionEnvironmentVariableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. 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"
      +}
  3. First observedv0.1.5

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it warns that the first call changes nothing, returns a diff for approval, and only writes when confirm: true is supplied. It does not cover overwrite behavior, permissions, or what happens to existing files beyond the diff preview.

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 front-loaded with purpose and kind semantics, then the preview/confirm workflow. It is dense but nearly every clause adds useful information, though a more structured format could improve scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter mutation tool with no annotations and no output schema, the description covers the central workflow and key kinds well. It remains incomplete about many optional parameters and side-effect details that an agent may need before invoking it.

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

Parameters2/5

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

Schema description coverage is only 31% across 13 parameters. The description adds valuable meaning for kind and reiterates confirm, but leaves many parameters such as site, overwrite, connectionName, includeSubPages, and connectionEnvironmentVariable unexplained.

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 gives a specific verb and resource: adding knowledge as YAML, and enumerates the four supported kinds. It clearly distinguishes these from portal-only knowledge types, but does not explicitly differentiate from sibling tools such as cs_edit_knowledge.

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?

It clearly explains when to use each kind, notes that Dataverse/AI Search/SQL knowledge are portal-only, and describes the required two-step preview-then-confirm workflow. It could be stronger by naming sibling alternatives for editing existing knowledge.

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