Skip to main content
Glama
ennuiii

Azure DevOps MCP Server with PAT Authentication

by ennuiii

testplan_add_test_cases_to_suite

Adds existing test cases to a specified test suite in an Azure DevOps project by providing project ID, test plan ID, suite ID, and test case IDs.

Instructions

Adds existing test cases to a test suite.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
planIdYesThe ID of the test plan.
projectYesThe unique identifier (ID or name) of the Azure DevOps project.
suiteIdYesThe ID of the test suite.
testCaseIdsYesThe ID(s) of the test case(s) to add.

Implementation Reference

  • The handler function that executes the tool logic: connects to Azure DevOps, converts testCaseIds to string if array, calls testApi.addTestCasesToSuite, and returns JSON stringified result.
    async ({ project, planId, suiteId, testCaseIds }) => {
      const connection = await connectionProvider();
      const testApi = await connection.getTestApi();
    
      // If testCaseIds is an array, convert it to comma-separated string
      const testCaseIdsString = Array.isArray(testCaseIds) ? testCaseIds.join(",") : testCaseIds;
    
      const addedTestCases = await testApi.addTestCasesToSuite(project, planId, suiteId, testCaseIdsString);
    
      return {
        content: [{ type: "text", text: JSON.stringify(addedTestCases, null, 2) }],
      };
    }
  • Zod schema defining input parameters for the tool.
    {
      project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."),
      planId: z.number().describe("The ID of the test plan."),
      suiteId: z.number().describe("The ID of the test suite."),
      testCaseIds: z.string().or(z.array(z.string())).describe("The ID(s) of the test case(s) to add. "),
    },
  • Registers the 'testplan_add_test_cases_to_suite' tool on the MCP server with description, input schema, and handler function.
    server.tool(
      Test_Plan_Tools.add_test_cases_to_suite,
      "Adds existing test cases to a test suite.",
      {
        project: z.string().describe("The unique identifier (ID or name) of the Azure DevOps project."),
        planId: z.number().describe("The ID of the test plan."),
        suiteId: z.number().describe("The ID of the test suite."),
        testCaseIds: z.string().or(z.array(z.string())).describe("The ID(s) of the test case(s) to add. "),
      },
      async ({ project, planId, suiteId, testCaseIds }) => {
        const connection = await connectionProvider();
        const testApi = await connection.getTestApi();
    
        // If testCaseIds is an array, convert it to comma-separated string
        const testCaseIdsString = Array.isArray(testCaseIds) ? testCaseIds.join(",") : testCaseIds;
    
        const addedTestCases = await testApi.addTestCasesToSuite(project, planId, suiteId, testCaseIdsString);
    
        return {
          content: [{ type: "text", text: JSON.stringify(addedTestCases, null, 2) }],
        };
      }
    );
  • Defines constant object with tool names, including 'testplan_add_test_cases_to_suite' used in registration.
    const Test_Plan_Tools = {
      create_test_plan: "testplan_create_test_plan",
      create_test_case: "testplan_create_test_case",
      add_test_cases_to_suite: "testplan_add_test_cases_to_suite",
      test_results_from_build_id: "testplan_show_test_results_from_build_id",
      list_test_cases: "testplan_list_test_cases",
      list_test_plans: "testplan_list_test_plans",
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Adds existing test cases to a test suite,' implying a mutation operation, but does not cover critical aspects like permissions required, whether the operation is idempotent, error handling, or what happens if test cases are already in the suite. This leaves significant gaps in understanding the tool's behavior.

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 a single, clear sentence that directly states the tool's purpose without any unnecessary words or fluff. It is front-loaded and efficiently communicates the core action, making it easy to understand at a glance.

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

Completeness2/5

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

Given the complexity of a mutation tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits, error conditions, and what the tool returns, which are crucial for an AI agent to use it correctly. The high schema coverage does not compensate for these missing contextual elements.

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 schema description coverage is 100%, meaning all parameters are documented in the input schema. The description does not add any additional meaning or context beyond what the schema provides, such as explaining relationships between parameters or usage examples. Since the schema handles the heavy lifting, the baseline score of 3 is appropriate.

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 action ('Adds') and the target resources ('existing test cases to a test suite'), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'testplan_create_test_case' or 'testplan_list_test_cases', which involve test cases but for different purposes, so it falls short of a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, such as when to add test cases versus creating new ones or listing existing ones. It lacks context about prerequisites, like whether the test cases must already exist or be in a specific state, and does not mention any exclusions or related tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ennuiii/DevOpsMcpPAT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server