Skip to main content
Glama

search_test_plans

Search test plans in a Jira project by providing the project ID. Returns paginated results with internal ID needed for linking test cycles. Filter by folder, status, priority, assignee, or free text query.

Instructions

Search test plans in a project. Returns total count and paginated list with id, key, projectId, archived. The 'id' field is the internal ID needed for linking cycles.

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:530-545 (registration)
    Registration of the 'search_test_plans' tool via the `tool()` wrapper which calls `server.registerTool()`.
    tool(
      "search_test_plans",
      "Search test plans in a project. Returns total count and paginated list with id, key, projectId, archived. The 'id' field is the internal ID needed for linking cycles.",
      {
        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(`/testplans/search${qs({ startAt, maxResults, sort, fields })}`, {
            method: "POST",
            body: JSON.stringify({ filter: { projectId, ...filters } }),
          })
        )
    );
  • Handler function for 'search_test_plans'. It sends a POST request to `/testplans/search` with pagination, sort, fields, and a filter containing projectId and other search filters.
    async ({ startAt, maxResults, sort, fields, projectId, ...filters }) =>
      ok(
        await qtmFetch(`/testplans/search${qs({ startAt, maxResults, sort, fields })}`, {
          method: "POST",
          body: JSON.stringify({ filter: { projectId, ...filters } }),
        })
      )
  • Input schema for 'search_test_plans'. Requires projectId (string or number), spreads 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,
    },
  • SearchFilters object spread into the tool's schema, defining optional filter properties: folderId, status, priority, assignee, query.
    const SearchFilters = {
      folderId: z.number().int().optional().describe("Filter by folder ID"),
      status: z.array(z.string()).optional().describe("Filter by status values"),
      priority: z.array(z.string()).optional().describe("Filter by priority values"),
      assignee: z.array(z.string()).optional().describe("Filter by assignee Jira account IDs"),
      query: z.string().optional().describe("Free-text search query"),
    };
  • Pagination object spread into the tool's schema, defining optional pagination properties: startAt, maxResults, sort, fields.
    const Pagination = {
      startAt: z.number().int().min(0).optional().describe("Page offset (default 0)"),
      maxResults: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Items per page (max 100, default 50)"),
      sort: z.string().optional().describe('Sort e.g. "id:asc" or "updated:desc"'),
      fields: z.string().optional().describe("Comma-separated fields to return"),
    };
Behavior2/5

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

No annotations provided, so description must disclose behavioral traits. It mentions return fields but does not state read-only nature, authentication requirements, rate limits, or destructive potential.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two well-structured sentences with front-loaded purpose. No fluff, but could be more structured with bullet points.

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 10 parameters, no annotations, and no output schema, the description is inadequate. It does not explain pagination behavior, search semantics, or output structure beyond a few fields.

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?

Input schema has 100% parameter descriptions, so baseline is 3. Description does not add additional meaning beyond schema; it only mentions output fields.

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?

Description clearly states it searches test plans in a project, which is a specific verb+resource. It distinguishes from sibling search tools by resource type (test plans vs test cases/cycles).

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?

Provides some usage context (returns paginated list, id needed for linking cycles) but no explicit guidance on when to use vs alternatives or when not to use.

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