Skip to main content
Glama

create_manual_test_case

Document new test scenarios with detailed steps, preconditions, and metadata. Define priority, severity, and type to organize manual testing.

Instructions

Create a new manual test case. Use this to document new test scenarios, features, or requirements. Supports adding test steps, preconditions, postconditions, and metadata like priority, severity, and type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (Required). The TestDino project identifier.
titleYesTest case title (Required). A clear, descriptive title for the test case.
suiteNameYesTest suite name (Required). The suite where this test case will be created. Use list_manual_test_suites to find suite names.
descriptionNoDetailed description of what this test case validates.
statusNoTest case status.
testStepsDeclarationTypeNoType of test steps declaration format.
preconditionsNoPrerequisites or setup required before executing this test case.
postconditionsNoExpected state or cleanup actions after executing this test case.
stepsNoArray of test steps. For Classic format: action, expectedResult, and optional data. For Gherkin format: event and stepDescription. Each top-level step can include attachments as URLs or local file paths.
priorityNoTest case priority level.
severityNoTest case severity level.
typeNoTest case type.
layerNoTest layer.
behaviorNoTest behavior type.
automationStatusNoAutomation status of the test case.
tagsNoTags to add to your test cases.
flagsNoAutomation flags/checklist options.
attachmentsNoArray of attachment URLs or file paths (up to 10MB each).
customFieldsNoCustom fields as key-value pairs. Only available if custom fields are configured in test case management settings.

Implementation Reference

  • The handler function that executes the 'create_manual_test_case' tool logic. It validates required args (projectId, title, suiteName), builds the request body with optional fields, processes attachments, calls the API via POST, and returns the response.
    export async function handleCreateManualTestCase(
      args?: CreateManualTestCaseArgs
    ) {
      // Read PAT from environment variable (set in mcp.json) or from args
      const token = getApiKey(args);
    
      if (!token) {
        throw new Error(
          "Missing TESTDINO_PAT environment variable. " +
            "Please configure it in your .cursor/mcp.json file under the 'env' section."
        );
      }
    
      // Validate required parameters
      if (!args?.projectId) {
        throw new Error("projectId is required");
      }
      if (!args?.title) {
        throw new Error("title is required");
      }
      if (!args?.suiteName) {
        throw new Error("suiteName is required");
      }
    
      try {
        const body: CreateManualTestCaseBody = {
          projectId: String(args.projectId),
          title: String(args.title),
          suiteName: String(args.suiteName),
        };
    
        // Add optional fields
        if (args?.description) {
          body.description = String(args.description);
        }
        if (args?.status) {
          body.status = String(args.status);
        }
        if (args?.testStepsDeclarationType) {
          body.testStepsDeclarationType = String(args.testStepsDeclarationType);
        }
        if (args?.preconditions) {
          body.preconditions = String(args.preconditions);
        }
        if (args?.postconditions) {
          body.postconditions = String(args.postconditions);
        }
        if (args?.steps) {
          body.steps = processStepAttachments(args.steps);
        }
        if (args?.priority) {
          body.priority = String(args.priority);
        }
        if (args?.severity) {
          body.severity = String(args.severity);
        }
        if (args?.type) {
          body.type = String(args.type);
        }
        if (args?.layer) {
          body.layer = String(args.layer);
        }
        if (args?.behavior) {
          body.behavior = String(args.behavior);
        }
        if (args?.automationStatus) {
          body.automationStatus = String(args.automationStatus);
        }
        if (args?.tags) {
          body.tags = String(args.tags);
        }
        if (args?.flags) {
          body.flags = args.flags.map(String);
        }
        if (args?.attachments) {
          // Process attachments: convert local file paths to file data objects (same format as UI)
          body.attachments = processAttachments(args.attachments);
        }
        if (args?.customFields) {
          body.customFields = args.customFields;
        }
    
        const createManualTestCaseUrl = endpoints.createManualTestCase(
          String(args.projectId)
        );
    
        const response = await apiRequestJson<unknown>(createManualTestCaseUrl, {
          method: "POST",
          headers: {
            Authorization: `Bearer ${token}`,
          },
          body,
        });
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new Error(`Failed to create manual test case: ${errorMessage}`);
      }
    }
  • Input arguments interface (CreateManualTestCaseArgs) defining all parameters accepted by the tool.
    interface CreateManualTestCaseArgs {
      projectId: string;
      title: string;
      suiteName: string;
      description?: string;
      status?: "Active" | "Draft" | "Deprecated";
      testStepsDeclarationType?: "Classic" | "Gherkin";
      preconditions?: string;
      postconditions?: string;
      steps?: TestStep[];
      priority?: "high" | "medium" | "low" | "Not set";
      severity?:
        | "Blocker"
        | "critical"
        | "major"
        | "Normal"
        | "minor"
        | "trivial"
        | "Not set";
      type?:
        | "functional"
        | "smoke"
        | "regression"
        | "security"
        | "performance"
        | "e2e"
        | "Integration"
        | "API"
        | "Unit"
        | "Accessability"
        | "Compatibility"
        | "Acceptance"
        | "Exploratory"
        | "Usability"
        | "Other";
      layer?: "e2e" | "api" | "unit" | "not set";
      behavior?: "positive" | "negative" | "destructive" | "Not set";
      automationStatus?: "Manual" | "Automated" | "To be automated";
      tags?: string;
      flags?: ("To be Automated" | "Is flaky" | "Muted")[];
      attachments?: string[]; // Array of attachment URLs or file paths (up to 10MB) - will be processed to FileData objects
      customFields?: Record<string, string>; // Custom fields as key-value pairs
    }
  • Request body interface (CreateManualTestCaseBody) used when sending the POST request to the API.
    interface CreateManualTestCaseBody {
      projectId: string;
      title: string;
      suiteName: string;
      description?: string;
      status?: string;
      testStepsDeclarationType?: string;
      preconditions?: string;
      postconditions?: string;
      steps?: TestStep[];
      priority?: string;
      severity?: string;
      type?: string;
      layer?: string;
      behavior?: string;
      automationStatus?: string;
      tags?: string;
      flags?: string[];
      attachments?: (FileData | string)[];
      customFields?: Record<string, string>;
    }
  • Tool definition object (createManualTestCaseTool) with name 'create_manual_test_case', description, and input schema (JSON Schema) defining all required/optional properties.
    export const createManualTestCaseTool = {
      name: "create_manual_test_case",
      description:
        "Create a new manual test case. Use this to document new test scenarios, features, or requirements. Supports adding test steps, preconditions, postconditions, and metadata like priority, severity, and type.",
      inputSchema: {
        type: "object",
        properties: {
          projectId: {
            type: "string",
            description: "Project ID (Required). The TestDino project identifier.",
          },
          title: {
            type: "string",
            description:
              "Test case title (Required). A clear, descriptive title for the test case.",
          },
          suiteName: {
            type: "string",
            description:
              "Test suite name (Required). The suite where this test case will be created. Use list_manual_test_suites to find suite names.",
          },
          description: {
            type: "string",
            description: "Detailed description of what this test case validates.",
          },
          status: {
            type: "string",
            description: "Test case status.",
            enum: ["Active", "Draft", "Deprecated"],
          },
          testStepsDeclarationType: {
            type: "string",
            description: "Type of test steps declaration format.",
            enum: ["Classic", "Gherkin"],
          },
          preconditions: {
            type: "string",
            description:
              "Prerequisites or setup required before executing this test case.",
          },
          postconditions: {
            type: "string",
            description:
              "Expected state or cleanup actions after executing this test case.",
          },
          steps: {
            type: "array",
            description:
              "Array of test steps. For Classic format: action, expectedResult, and optional data. For Gherkin format: event and stepDescription. Each top-level step can include attachments as URLs or local file paths.",
            items: {
              type: "object",
              oneOf: [
                {
                  properties: {
                    action: {
                      type: "string",
                      description:
                        "The action to perform in this step (Classic format).",
                    },
                    expectedResult: {
                      type: "string",
                      description:
                        "The expected outcome of this action (Classic format).",
                    },
                    data: {
                      type: "string",
                      description:
                        "Optional test data for this step (Classic format).",
                    },
                    attachments: {
                      type: "array",
                      description:
                        "Optional top-level step attachments as URLs or local file paths.",
                      items: { type: "string" },
                    },
                  },
                  required: ["action", "expectedResult"],
                },
                {
                  properties: {
                    event: {
                      type: "string",
                      description: "Gherkin event keyword (Gherkin format).",
                      enum: ["Given", "When", "And", "Then", "But"],
                    },
                    stepDescription: {
                      type: "string",
                      description: "The step description (Gherkin format).",
                    },
                    attachments: {
                      type: "array",
                      description:
                        "Optional top-level step attachments as URLs or local file paths.",
                      items: { type: "string" },
                    },
                  },
                  required: ["event", "stepDescription"],
                },
              ],
            },
          },
          priority: {
            type: "string",
            description: "Test case priority level.",
            enum: ["high", "medium", "low", "Not set"],
          },
          severity: {
            type: "string",
            description: "Test case severity level.",
            enum: [
              "Blocker",
              "critical",
              "major",
              "Normal",
              "minor",
              "trivial",
              "Not set",
            ],
          },
          type: {
            type: "string",
            description: "Test case type.",
            enum: [
              "functional",
              "smoke",
              "regression",
              "security",
              "performance",
              "e2e",
              "Integration",
              "API",
              "Unit",
              "Accessability",
              "Compatibility",
              "Acceptance",
              "Exploratory",
              "Usability",
              "Other",
            ],
          },
          layer: {
            type: "string",
            description: "Test layer.",
            enum: ["e2e", "api", "unit", "not set"],
          },
          behavior: {
            type: "string",
            description: "Test behavior type.",
            enum: ["positive", "negative", "destructive", "Not set"],
          },
          automationStatus: {
            type: "string",
            description: "Automation status of the test case.",
            enum: ["Manual", "Automated", "To be automated"],
          },
          tags: {
            type: "string",
            description: "Tags to add to your test cases.",
          },
          flags: {
            type: "array",
            description: "Automation flags/checklist options.",
            items: {
              type: "string",
              enum: ["To be Automated", "Is flaky", "Muted"],
            },
          },
          attachments: {
            type: "array",
            description:
              "Array of attachment URLs or file paths (up to 10MB each).",
            items: {
              type: "string",
            },
          },
          customFields: {
            type: "object",
            description:
              "Custom fields as key-value pairs. Only available if custom fields are configured in test case management settings.",
            additionalProperties: {
              type: "string",
            },
          },
        },
        required: ["projectId", "title", "suiteName"],
      },
    };
  • Endpoint URL builder that constructs the API URL for creating a manual test case: POST /api/mcp/manual-tests/:projectId/test-cases
    createManualTestCase: (projectId: string): string => {
      const baseUrl = getBaseUrl();
      return `${baseUrl}/api/mcp/manual-tests/${projectId}/test-cases`;
    },
Behavior2/5

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

With no annotations provided, the description must disclose behavioral traits. It states the tool creates a test case, but does not mention any side effects, required permissions, rate limits, or error handling. For a creation tool, this minimal transparency is inadequate.

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 two sentences, front-loading the core purpose. Every sentence adds value, and there is no redundancy or wasted text.

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?

The tool has 19 parameters and no output schema. The description lacks information about what the tool returns upon success (e.g., ID of created test case) or potential errors. Given the complexity, the description is incomplete.

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 input schema has 100% coverage with detailed parameter descriptions. The description adds marginal value by summarizing supported fields ('test steps, preconditions, postconditions, and metadata'), but does not provide additional meaning beyond what the schema already conveys. Baseline 3 is appropriate.

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 clearly states the tool's action ('Create a new manual test case') and resource ('manual test case'). It distinguishes from sibling tools like create_manual_run or create_manual_test_suite by specifying it's for documenting test scenarios, features, or requirements.

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?

The description explicitly says 'Use this to document new test scenarios, features, or requirements,' which provides clear usage context. However, it does not mention when not to use it or suggest alternatives (e.g., use create_manual_run for executing test cases), so it stops short of a 5.

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

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/testdino-hq/testdino-mcp'

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