Skip to main content
Glama

update_test_case

Modify existing test case details like summary, description, labels, or priority in Xray test management system to maintain accurate test documentation.

Instructions

Update an existing test case

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testKeyYesThe test case key (e.g., "PROJ-123")
summaryNoNew summary/title for the test case
descriptionNoNew description for the test case
labelsNoNew labels for the test case
priorityNoNew priority for the test case

Implementation Reference

  • Core handler function in XrayClient that implements the update_test_case logic. Currently throws an informative error as direct updates are not supported.
    async updateTestCase(testKey: string, updates: Partial<TestCase>): Promise<void> {
      throw new Error(
        'Direct test case update is not supported via Xray GraphQL API. ' +
        'Use Jira REST API to update standard fields (summary, description, labels, priority). ' +
        'Use specific Xray mutations for test definition updates: ' +
        'updateUnstructuredTestDefinition, updateGherkinTestDefinition, updateTestType, etc.'
      );
    }
  • MCP CallToolRequest handler (switch case) that parses input arguments and calls the XrayClient.updateTestCase method.
    case 'update_test_case': {
      const updates: Partial<TestCase> = {};
      if (args.summary) updates.summary = args.summary as string;
      if (args.description) updates.description = args.description as string;
      if (args.labels) updates.labels = args.labels as string[];
      if (args.priority) updates.priority = args.priority as string;
    
      await xrayClient.updateTestCase(args.testKey as string, updates);
      return {
        content: [
          {
            type: 'text',
            text: `Test case ${args.testKey} updated successfully`,
          },
        ],
      };
    }
  • Input schema definition for the update_test_case tool, defining parameters like testKey, summary, description, labels, and priority.
    inputSchema: {
      type: 'object',
      properties: {
        testKey: {
          type: 'string',
          description: 'The test case key (e.g., "PROJ-123")',
        },
        summary: {
          type: 'string',
          description: 'New summary/title for the test case',
        },
        description: {
          type: 'string',
          description: 'New description for the test case',
        },
        labels: {
          type: 'array',
          items: { type: 'string' },
          description: 'New labels for the test case',
        },
        priority: {
          type: 'string',
          description: 'New priority for the test case',
        },
      },
      required: ['testKey'],
    },
  • src/index.ts:80-110 (registration)
    Tool registration in the tools array provided to MCP ListToolsRequest handler.
    {
      name: 'update_test_case',
      description: 'Update an existing test case',
      inputSchema: {
        type: 'object',
        properties: {
          testKey: {
            type: 'string',
            description: 'The test case key (e.g., "PROJ-123")',
          },
          summary: {
            type: 'string',
            description: 'New summary/title for the test case',
          },
          description: {
            type: 'string',
            description: 'New description for the test case',
          },
          labels: {
            type: 'array',
            items: { type: 'string' },
            description: 'New labels for the test case',
          },
          priority: {
            type: 'string',
            description: 'New priority for the test case',
          },
        },
        required: ['testKey'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is an update operation, implying mutation, but doesn't cover critical aspects like required permissions, whether changes are reversible, rate limits, or what the response looks like (since no output schema exists). This leaves significant gaps for an agent to understand 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, direct sentence with zero wasted words—'Update an existing test case' is front-loaded and efficiently conveys the core action. Every part of the description earns its place, making it highly concise and well-structured.

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 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., side effects, error handling), usage context, and output expectations, failing to compensate for the missing structured data and leaving the agent under-informed.

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%, with all 5 parameters clearly documented in the schema itself (e.g., testKey as the identifier, summary as the title). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing test case' clearly states the verb ('update') and resource ('test case'), making the purpose understandable. However, it doesn't differentiate this tool from its sibling 'update_test_run_status' or other update-like operations, nor does it specify what aspects of a test case can be updated beyond what the schema reveals.

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 like 'create_test_case' for new entries or 'delete_test_case' for removal. It doesn't mention prerequisites (e.g., needing an existing test case key) or contextual cues for selection among sibling tools, leaving usage entirely implicit.

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/c4m3lblue-star/xray-mcp'

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