Skip to main content
Glama

Run local conversation tests

cs_run_conversation_tests

Run YAML test files against a published Copilot Studio agent to assert expected wording and confirm actual tool, topic, and knowledge usage, then report pass/fail.

Instructions

Run a YAML test file (tests: name, utterance, expect, continueConversation) against the published agent through cs_chat and report pass/fail. expect asserts on wording (contains, containsAny, notContains, regex, minLength, noSignIn) and on what the agent did (usedTool, notUsedTool, usedTopic, notUsedTopic, citedKnowledge), so a test can tell a real tool call from an answer that merely sounds right. Every result reports the observed topic, tool and citations whether or not it asserted on them. The CLI-native complement to portal evaluations. Pass writeExample to create a starter file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
botIdNoAgent (bot) id. Defaults to workspace sync metadata or CPS_AGENT_ID.
testsNo
clientIdNoEntra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id.
tenantIdNoEntra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID.
transportNoauto detects the agent's authentication mode via Dataverse; directline for no-auth/manual-auth agents; sdk for Entra SSO agents
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
schemaNameNo
stopOnFailNo
dataverseUrlNo
writeExampleNoPath to write an example test file, then return
environmentIdNoPower Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID.
tokenEndpointNoExplicit DirectLine token endpoint
conversationIdNoContinue an earlier conversation from cs_chat
directLineSecretNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / tests / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / tests / items / properties / expect / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv0.1.5

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it explains pass/fail reporting, the expectation types, that every result reports observed topic/tool/citations, and that writeExample writes a file and returns. It does not cover auth requirements or side-effect boundaries in depth, but the core test-execution behavior is clearly disclosed.

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 and front-loaded: the first sentence covers the core action and mechanism, later sentences add assertion and reporting semantics, then the sibling positioning and writeExample hint. Every sentence contributes useful selection or invocation context.

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 15-parameter tool with no output schema and no annotations, the description covers the essential execution model, expected test shape, assertion vocabulary, result reporting, and writeExample behavior. It is not exhaustive on auth/config parameters, but it is complete enough to select and invoke the tool for its primary purpose.

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 60%, and the description adds meaningful semantics beyond the schema for the central file/tests parameters: it lists the YAML test fields and the assertion vocabulary used by expect. It also explains writeExample and the cs_chat relationship, though several config parameters rely on schema descriptions.

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 states a specific verb and resource: it runs a YAML test file against the published agent through cs_chat and reports pass/fail. It also distinguishes itself as the CLI-native complement to portal evaluations, so the agent can separate it from evaluation-run siblings such as cs_run_evaluation.

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 gives clear usage context: use a YAML test file with tests and expectations against the published agent, and use writeExample to scaffold a starter file. It does not explicitly state when not to use it or compare it directly with cs_run_evaluation, but the complement-to-portal-evaluations framing provides usable 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