Skip to main content
Glama

search_test_cycles

Search test cycles in a Jira project using filters like status, priority, and assignee. Get paginated results with cycle IDs needed for subsequent test execution tools.

Instructions

Search test cycles in a project. Returns total count and paginated list with id, key, status, priority, archived. The 'id' field in results is the internal ID needed for execution tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesJira project numeric ID (e.g. 10011)
folderIdNoFilter by folder ID
statusNoFilter by status values
priorityNoFilter by priority values
assigneeNoFilter by assignee Jira account IDs
queryNoFree-text search query
startAtNoPage offset (default 0)
maxResultsNoItems per page (max 100, default 50)
sortNoSort e.g. "id:asc" or "updated:desc"
fieldsNoComma-separated fields to return

Implementation Reference

  • src/index.ts:374-389 (registration)
    Registration of the 'search_test_cycles' tool via the 'tool' helper wrapper, with its name, description, schema, and callback handler.
    tool(
      "search_test_cycles",
      "Search test cycles in a project. Returns total count and paginated list with id, key, status, priority, archived. The 'id' field in results is the internal ID needed for execution tools.",
      {
        projectId: z.union([z.string(), z.number()]).describe("Jira project numeric ID (e.g. 10011)"),
        ...SearchFilters,
        ...Pagination,
      },
      async ({ startAt, maxResults, sort, fields, projectId, ...filters }) =>
        ok(
          await qtmFetch(`/testcycles/search${qs({ startAt, maxResults, sort, fields })}`, {
            method: "POST",
            body: JSON.stringify({ filter: { projectId, ...filters } }),
          })
        )
    );
  • Input schema for search_test_cycles: projectId (union string/number), plus shared SearchFilters (folderId, status, priority, assignee, query) and Pagination (startAt, maxResults, sort, fields).
      projectId: z.union([z.string(), z.number()]).describe("Jira project numeric ID (e.g. 10011)"),
      ...SearchFilters,
      ...Pagination,
    },
  • Handler function that sends a POST request to /testcycles/search with the filter object containing projectId and optional filters, supporting pagination via query parameters.
      async ({ startAt, maxResults, sort, fields, projectId, ...filters }) =>
        ok(
          await qtmFetch(`/testcycles/search${qs({ startAt, maxResults, sort, fields })}`, {
            method: "POST",
            body: JSON.stringify({ filter: { projectId, ...filters } }),
          })
        )
    );
  • Helper function 'ok' used by the handler to wrap API responses into MCP tool content format.
    function ok(data: unknown) {
      return {
        content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }],
      };
  • Helper function 'qs' used by the handler to build query strings from optional pagination parameters.
    function qs(params: Record<string, string | number | undefined>): string {
      const p = new URLSearchParams();
      for (const [k, v] of Object.entries(params)) {
        if (v !== undefined) p.set(k, String(v));
      }
      const s = p.toString();
      return s ? `?${s}` : "";
    }
Behavior4/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. It discloses that the tool returns a paginated list with total count and notes that the 'id' field is the internal ID needed for execution tools. This adds value beyond the schema, though it could mention read-only nature more explicitly.

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?

Two concise sentences: the first states the primary action and return information, the second adds a critical detail about the id field. Every sentence provides value with no filler.

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?

Given the complexity of a search tool with 10 parameters and no output schema, the description covers the core functionality and returned fields. It lacks a full list of possible returned fields and does not explain the 'fields' parameter's effect, which is partially compensated by schema descriptions.

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?

Schema description coverage is 100%, so each parameter is already documented. The tool description does not add additional meaning to individual parameters beyond the schema descriptions. It mentions returned fields but does not elaborate on parameter usage.

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 it searches test cycles in a project and lists specific returned fields (id, key, status, priority, archived). It distinguishes itself from siblings by focusing on search and mentioning the internal ID needed for execution tools.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives (e.g., get_test_cycle or create_test_cycle). Usage is implied by the verb 'search' and the context of the tool name, but no when-not or alternative guidance is provided.

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/salehrifai42/qmetrymcp'

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