Skip to main content
Glama

Add a knowledge source

cs_add_knowledge_source

Add a knowledge source to a Copilot Studio agent by generating YAML definitions for public sites, SharePoint folders, Graph connectors, or file uploads. Preview changes first, then confirm to write.

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.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

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose the two-phase dry-run/write workflow ('The first call changes nothing... Call it again... with confirm: true to write them'). It also mentions the push-time upload behavior for 'files'. It does not cover authentication requirements or overwrite semantics, so it is not fully transparent.

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?

Three sentences carry a lot of content without filler, and the two-call caveat is placed where the agent can't miss it. The first sentence is dense with parentheticals, but every clause earns its place.

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 gives the essential kind taxonomy and the safe first-call protocol. It is not complete enough to guide all parameter choices or describe the exact return/diff format, leaving clear gaps.

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?

The description adds valuable meaning to the kind enum (Bing scoping, URL directness, env var, knowledge/files copy) and reinforces the confirm flow. However, schema coverage is only 31% and many parameters (overwrite, workspace, includeSubPages, triggerCondition, connectionName, contentSourceDisplayName) remain unexplained in both schema and description.

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 clearly states the operation ('Add knowledge as YAML') and enumerates the four supported kinds with their meaning. It does not explicitly distinguish itself from sibling cs_edit_knowledge, though the 'Add' verb and portal-only exclusion make the main purpose unambiguous.

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 supplies concrete when-to-use context for each kind and explicitly says Dataverse, AI Search and SQL knowledge are portal-only, i.e., not handled here. It stops short of naming an alternative tool for portal-only or edit scenarios, so it earns a 4 rather than a 5.

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